Package org.nuxeo.ecm.jwt
Interface JWTService
-
- All Known Implementing Classes:
JWTServiceImpl
public interface JWTService
The JSON Web Token (JWT) Service.- Since:
- 10.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
JWTService.JWTBuilder
A builder for a JSON Web Token (JWT).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JWTService.JWTBuilder
newBuilder()
Creates a new builder for a JSON Web Token.Map<String,Object>
verifyToken(String token)
Verifies the token and returns its claims, ornull
if the token is invalid (corrupted, constructed from an invalid secret, or expired).
-
-
-
Method Detail
-
newBuilder
JWTService.JWTBuilder newBuilder()
Creates a new builder for a JSON Web Token.- Returns:
- the new builder
-
verifyToken
Map<String,Object> verifyToken(String token)
Verifies the token and returns its claims, ornull
if the token is invalid (corrupted, constructed from an invalid secret, or expired).The claim
JWTClaims.CLAIM_SUBJECT
contains the token's creator user id.The token hash algorithm is based on a secret provided by the service configuration.
- Parameters:
token
- the token- Returns:
- the claims if the token is valid, or
null
if the token is invalid
-
-