Derek Seroky
02/01/2019, 3:35 PMktor.auth.jwt.JWTAuth
package in my application. However,
we use JWT with encrypted payloads and it seems I can't decrypt the token prior to the verifier running.
Is there a way we can intercept the pipeline prior to verifyAndValidate
to mutate the parsed header value or alternatively, override the parseAuthorizationHeader
so it returns the decrypted JWT to verifyAndValidate
?
Or, am I going about this the wrong way all together?
I'm happy to submit a PR to the project if it seems like I'm on the right path, but the functionality just doesn't exist yet.
Note: I'm not proposing a defined way to decrypt JWTs, but rather, I'm suggesting adding a method to give the option to transform the header prior to verifyAndValidate
since I'm assuming my encryption method may be slightly different (different Algorithms, padding, etc) than what others may want to use.
Thanks!