public abstract class AbstractJWT extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
protected |
AbstractJWT(de.samply.common.config.OAuth2Client config,
String serialized)
Initializes this JWT with an OAuth2Client configuration and
the serialized string.
|
protected |
AbstractJWT(PublicKey publicKey,
String serialized)
Initializes this JWT with a public key and the serialized string.
|
Modifier and Type | Method and Description |
---|---|
com.nimbusds.jwt.ReadOnlyJWTClaimsSet |
getClaimsSet()
Returns all claims
|
PublicKey |
getPublicKey()
Returns the public key that has been used to verify this JWT.
|
String |
getSerialized()
Returns the serialized string of this JWT
|
String |
getSubject()
Returns the subject.
|
protected abstract String |
getTokenType()
This method must return one of the currently defined token types:
|
boolean |
isValid()
Checks if this JWT is valid.
|
protected AbstractJWT(de.samply.common.config.OAuth2Client config, String serialized) throws JWTException
config
- the OAuth2 client side configuration. The public key is needed to check the signature.serialized
- the serialized JWTJWTException
- if any error occurs during deserialization or signature verificationprotected AbstractJWT(PublicKey publicKey, String serialized) throws JWTException
publicKey
- The identity providers public key (needed to check the signature)serialized
- the serialized JWTJWTException
- if any error occurs during deserialization or signature verificationpublic boolean isValid()
public com.nimbusds.jwt.ReadOnlyJWTClaimsSet getClaimsSet()
ReadOnlyJWTClaimsSet
object.public String getSerialized()
String
object.public String getSubject()
String
object.public PublicKey getPublicKey()
protected abstract String getTokenType()
ACCESS_TOKEN ID_TOKEN REFRESH_TOKEN
Copyright © 2015 Universitätsmedizin Mainz, Abteilung IMBEI. All rights reserved.