levino/mock-jwks

Please consider restoring JWKSMock interface

martin-walsh opened this issue · 4 comments

v1.0.5...v1.0.6 removed interface JWKSMock

This is a breaking change, especially when declared in many tests. Please consider restoring to reduce impact.

Thanks

Will do, sorry for the inconvenience.

I attempted to fix this in #84 . I release the changes as 1.0.8-preview.0. (I made a mistake and have to skip 1.0.7 now.). You can install that version with yarn add -D mock-jwks@preview. Could you please verify that the changes scratch your itch?

@martin-walsh did you see this? I am reluctant to merge it since it changes things "a little bit" ("iat" on the token payload json needs to be a number now, not a string) but I think that change is okay. Just let me know how the package now works for you.

I've tested it and it addresses the issues. Thanks for the quick turnaround!

I wouldn't worry about the iat change, it is correct now according to RFC

[4.1.6](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.6).  "iat" (Issued At) Claim

   The "iat" (issued at) claim identifies the time at which the JWT was
   issued.  This claim can be used to determine the age of the JWT.  Its
   value MUST be a number containing a NumericDate value.  Use of this
   claim is OPTIONAL.