Parse a JWT token, validates it and returns the payload. If the token is invalid, the function will return null. This function has an fail-safe mechanism, so it will never throw an error. (Tho it will log a warning if the token is invalid)
The JWT token to parse
Optional
The JWK to validate the token
Parse a JWT token, validates it and returns the payload. If the token is invalid, the function will return null. This function has an fail-safe mechanism, so it will never throw an error. (Tho it will log a warning if the token is invalid)