is compactVerify
supposed to throw JWTExpired?
#161
-
I'm looking at #62 and it seems like it should throw an error if the token is expired, but it's not happenning for me and i have to check expiration explicitly. Is there some argument that will get it to check exp and nbf?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No. compactVerify is not processing the payload of a token at all, it's a generic JWS utility. Maybe you should use the module targetted at validating JWTs instead of one purely for JWS. jose/jwt/verify (Verifies the JWT format (to be a JWS Compact format), verifies the JWS signature, validates the JWT Claims Set.) not jose/jws/compact/verify (Verifies the signature and format of and afterwards decodes the Compact JWS.) |
Beta Was this translation helpful? Give feedback.
No. compactVerify is not processing the payload of a token at all, it's a generic JWS utility. Maybe you should use the module targetted at validating JWTs instead of one purely for JWS.
jose/jwt/verify (Verifies the JWT format (to be a JWS Compact format), verifies the JWS signature, validates the JWT Claims Set.) not jose/jws/compact/verify (Verifies the signature and format of and afterwards decodes the Compact JWS.)