Constructor and Description |
---|
DefaultJWTParser() |
DefaultJWTParser(JWTAuthContextInfo authContextInfo) |
DefaultJWTParser(JWTAuthContextInfo authContextInfo,
JWTCallerPrincipalFactory factory) |
Modifier and Type | Method and Description |
---|---|
org.eclipse.microprofile.jwt.JsonWebToken |
decrypt(String bearerToken,
PrivateKey key)
Parse JWT token.
|
org.eclipse.microprofile.jwt.JsonWebToken |
decrypt(String bearerToken,
SecretKey key)
Parse JWT token.
|
org.eclipse.microprofile.jwt.JsonWebToken |
decrypt(String bearerToken,
String secret)
Parse JWT token.
|
org.eclipse.microprofile.jwt.JsonWebToken |
parse(String bearerToken)
Parse JWT token.
|
org.eclipse.microprofile.jwt.JsonWebToken |
parse(String bearerToken,
JWTAuthContextInfo newAuthContextInfo)
Parse JWT token.
|
org.eclipse.microprofile.jwt.JsonWebToken |
verify(String bearerToken,
PublicKey key)
Parse JWT token.
|
org.eclipse.microprofile.jwt.JsonWebToken |
verify(String bearerToken,
SecretKey key)
Parse JWT token.
|
org.eclipse.microprofile.jwt.JsonWebToken |
verify(String bearerToken,
String secret)
Parse JWT token.
|
public DefaultJWTParser()
public DefaultJWTParser(JWTAuthContextInfo authContextInfo)
public DefaultJWTParser(JWTAuthContextInfo authContextInfo, JWTCallerPrincipalFactory factory)
public org.eclipse.microprofile.jwt.JsonWebToken parse(String bearerToken) throws ParseException
JWTParser
JsonWebToken
.
This method depends on the injected JWTAuthContextInfo
configuration context.parse
in interface JWTParser
bearerToken
- the JWT tokenParseException
- parse exceptionpublic org.eclipse.microprofile.jwt.JsonWebToken parse(String bearerToken, JWTAuthContextInfo newAuthContextInfo) throws ParseException
JWTParser
JsonWebToken
.parse
in interface JWTParser
bearerToken
- the JWT tokennewAuthContextInfo
- the configuration context which will override the injected JWTAuthContextInfo
configuration
context.ParseException
- parse exceptionpublic org.eclipse.microprofile.jwt.JsonWebToken verify(String bearerToken, PublicKey key) throws ParseException
JWTParser
JsonWebToken
.verify
in interface JWTParser
bearerToken
- the JWT tokenkey
- the public verification key. The injected JWTAuthContextInfo
configuration context
will be reused, only its publicVerificationKey property will be replaced by this parameter.ParseException
- parse exceptionpublic org.eclipse.microprofile.jwt.JsonWebToken verify(String bearerToken, SecretKey key) throws ParseException
JWTParser
JsonWebToken
.verify
in interface JWTParser
bearerToken
- the JWT tokenkey
- the secret verification key. The injected JWTAuthContextInfo
configuration context
will be reused, only its secretVerificationKey property will be replaced by this parameter.ParseException
- parse exceptionpublic org.eclipse.microprofile.jwt.JsonWebToken verify(String bearerToken, String secret) throws ParseException
JWTParser
JsonWebToken
.verify
in interface JWTParser
bearerToken
- the JWT tokensecret
- the secret. The injected JWTAuthContextInfo
configuration context
will be reused, only its secretVerificationKey property will be replaced after
converting this parameter to SecretKey
.ParseException
- parse exceptionpublic org.eclipse.microprofile.jwt.JsonWebToken decrypt(String bearerToken, PrivateKey key) throws ParseException
JWTParser
JsonWebToken
.decrypt
in interface JWTParser
bearerToken
- the JWT tokenkey
- the private decryption key. The injected JWTAuthContextInfo
configuration context
will be reused, only its privateDecryptionkey property will be replaced by this parameter.ParseException
- parse exceptionpublic org.eclipse.microprofile.jwt.JsonWebToken decrypt(String bearerToken, SecretKey key) throws ParseException
JWTParser
JsonWebToken
.decrypt
in interface JWTParser
bearerToken
- the JWT tokenkey
- the secret decryption key. The injected JWTAuthContextInfo
configuration context
will be reused, only its secretDecryptionkey property will be replaced by this parameter.ParseException
- parse exceptionpublic org.eclipse.microprofile.jwt.JsonWebToken decrypt(String bearerToken, String secret) throws ParseException
JWTParser
JsonWebToken
.decrypt
in interface JWTParser
bearerToken
- the JWT tokensecret
- the secret. The injected JWTAuthContextInfo
configuration context
will be reused, only its secretDecryptionkey property will be replaced will be replaced after
converting this parameter to SecretKey
.ParseException
- parse exceptionCopyright © 2018–2021. All rights reserved.