Replies: 1 comment 1 reply
-
import * as jose from 'jose';
const JWKS = jose.createRemoteJWKSet(new URL(issuer.metadata.jwks_uri))
const { payload, protectedHeader } = await jose.jwtVerify(jwt, JWKS, {
typ: 'jwt+at',
issuer: 'urn:example:issuer',
audience: 'urn:example:audience',
})
// assert payload claims you require such as scope |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there, thanks for an amazing library!
I was wondering if there was a possibility for you to expose the
validateJWT
function in theBaseClient
. It would seem this function is perfect to use since it is already setup to obtain updated public keys published by the OP (among other things).I see the discussion of offline validation here #568, but I wonder if it'd be easier to use the existing infrastructure in this library instead of building my own code using
jose
.Beta Was this translation helpful? Give feedback.
All reactions