public interface JWTProcessor<C extends SecurityContext>
unsecured
(plain), signed
and
encrypted
JSON Web Tokens (JWTs).Modifier and Type | Method and Description |
---|---|
JWTClaimsSet |
process(EncryptedJWT encryptedJWT,
C context)
Processes the specified encrypted JWT by decrypting it.
|
JWTClaimsSet |
process(JWT jwt,
C context)
Processes the specified JWT (unsecured, signed or encrypted).
|
JWTClaimsSet |
process(PlainJWT plainJWT,
C context)
Processes the specified unsecured (plain) JWT, typically by checking
its context.
|
JWTClaimsSet |
process(SignedJWT signedJWT,
C context)
Processes the specified signed JWT by verifying its signature.
|
JWTClaimsSet |
process(String jwtString,
C context)
Parses and processes the specified JWT (unsecured, signed or
encrypted).
|
JWTClaimsSet process(String jwtString, C context) throws ParseException, BadJOSEException, JOSEException
jwtString
- The JWT, compact-encoded to a URL-safe string. Must
not be null
.context
- Optional context of the JOSE object, null
if not required.ParseException
- If the string couldn't be parsed to a valid
JWT.BadJOSEException
- If the JWT is rejected.JOSEException
- If an internal processing exception is
encountered.JWTClaimsSet process(JWT jwt, C context) throws BadJOSEException, JOSEException
jwt
- The JWT. Must not be null
.context
- Optional context of the JOSE object, null
if
not required.BadJOSEException
- If the JWT is rejected.JOSEException
- If an internal processing exception is
encountered.JWTClaimsSet process(PlainJWT plainJWT, C context) throws BadJOSEException, JOSEException
plainJWT
- The unsecured (plain) JWT. Not null
.context
- Optional context of the unsecured JWT, null
if not required.BadJOSEException
- If the unsecured (plain) JWT is rejected,
after examining the context or due to the
payload not being a JSON object.JOSEException
- If an internal processing exception is
encountered.JWTClaimsSet process(SignedJWT signedJWT, C context) throws BadJOSEException, JOSEException
signedJWT
- The signed JWT. Not null
.context
- Optional context of the signed JWT, null
if
not required.BadJOSEException
- If the signed JWT is rejected, typically
due to a bad signature or the payload not
being a JSON object.JOSEException
- If an internal processing exception is
encountered.JWTClaimsSet process(EncryptedJWT encryptedJWT, C context) throws BadJOSEException, JOSEException
encryptedJWT
- The encrypted JWT. Not null
.context
- Optional context of the encrypted JWT,
null
if not required.BadJOSEException
- If the encrypted JWT is rejected, typically
due to failed decryption or the payload not
being a JSON object.JOSEException
- If an internal processing exception is
encountered.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.