Class JWTCredentials
java.lang.Object
dev.getelements.elements.security.JWTCredentials
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts thisJWTCredentialstoCustomJWTCredentials, throwing the appropriate exceptions if the conversion is not appropriate for this instance.Finds the audience of the token.Finds the expiration date of the token.Finds the issuer of the token.com.auth0.jwt.interfaces.DecodedJWTGets theDecodedJWTbacking this object.static booleanChecks if a set of credentials is a valid JWT.booleanverify(com.auth0.jwt.algorithms.Algorithm algorithm) Verifies the JWT has the required data, and that the signature matches
-
Constructor Details
-
JWTCredentials
Generic JWT Credentials.- Parameters:
token- the token to parse.
-
-
Method Details
-
isJwt
Checks if a set of credentials is a valid JWT.- Parameters:
credentials- the credentials- Returns:
- true if JWT, or false otherwise.
-
getDecoded
public com.auth0.jwt.interfaces.DecodedJWT getDecoded()Gets theDecodedJWTbacking this object.- Returns:
- the decoded JWT
-
findIssuer
Finds the issuer of the token. -
findAudience
Finds the audience of the token. -
findExpirationDate
Finds the expiration date of the token. -
verify
public boolean verify(com.auth0.jwt.algorithms.Algorithm algorithm) Verifies the JWT has the required data, and that the signature matches- Returns:
- if the JWT token is valid
-
asCustomCredentials
Converts thisJWTCredentialstoCustomJWTCredentials, throwing the appropriate exceptions if the conversion is not appropriate for this instance.- Returns:
CustomJWTCredentials, if the supplied credentials are valid
-