|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.openid.connect.sdk.util.DefaultJWTDecoder
@ThreadSafe public class DefaultJWTDecoder
The default decoder of JSON Web Tokens (JWTs). This class is thread-safe.
Supports:
Not supported: JWS-signed and then JWE-encrypted (nested) objects.
Constructor Summary | |
---|---|
DefaultJWTDecoder()
Creates a new decoder of JSON Web Tokens (JWTs). |
Method Summary | |
---|---|
void |
addJWEDecrypter(com.nimbusds.jose.JWEDecrypter decrypter)
Adds the specified JWE decrypter for decoding encrypted JWTs. |
void |
addJWSVerifier(com.nimbusds.jose.JWSVerifier verifier)
Adds the specified JWS verifier for decoding signed JWTs. |
com.nimbusds.jwt.ReadOnlyJWTClaimsSet |
decodeJWT(com.nimbusds.jwt.JWT jwt)
Decodes a JWT object, then applies JWS signature validation and / or JWE decryption if the token is secured. |
Collection<com.nimbusds.jose.JWEDecrypter> |
getJWEDecrypters()
Gets the JWE decrypters. |
Collection<com.nimbusds.jose.JWSVerifier> |
getJWSVerifiers()
Gets the JWS verifiers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultJWTDecoder()
Method Detail |
---|
public void addJWSVerifier(com.nimbusds.jose.JWSVerifier verifier)
verifier
- The JWS verifier to add. Must be ready to verify
signed JWTs and not null
.public Collection<com.nimbusds.jose.JWSVerifier> getJWSVerifiers()
public void addJWEDecrypter(com.nimbusds.jose.JWEDecrypter decrypter)
decrypter
- The JWE decrypter to add. Must be ready to decrypt
encrypted JWTs and not null
.public Collection<com.nimbusds.jose.JWEDecrypter> getJWEDecrypters()
public com.nimbusds.jwt.ReadOnlyJWTClaimsSet decodeJWT(com.nimbusds.jwt.JWT jwt) throws com.nimbusds.jose.JOSEException, ParseException
JWTDecoder
decodeJWT
in interface JWTDecoder
jwt
- The JWT to decode. Must not be null
.
com.nimbusds.jose.JOSEException
- If decoding, JWS validation and / or JWE
decryption of the JWT failed.
ParseException
- If parsing of the JWT claims set failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |