paragonie / paseto

Platform-Agnostic Security Tokens
https://paseto.io
Other
3.24k stars 108 forks source link

v4: read claims of an expired token #172

Closed razvanioan closed 1 year ago

razvanioan commented 1 year ago

I see that there is no way to read claims of an expired token anymore (I could do that in v2). There are some cases I need the embedded info even if token is not valid anymore.

razvanioan commented 1 year ago

Ah, I can use the parse with true for skipValidation parameter Although, it would have been nice to validate the rest of the claims, but skip only expiration ...

paragonie-security commented 1 year ago

You can.

https://github.com/paragonie/paseto/blob/master/src/Parser.php#L663-L666

https://github.com/paragonie/paseto/blob/master/src/Parsing/NonExpiringSupport.php#L7-L20