public static interface JWTService.JWTBuilder
Modifier and Type | Method and Description |
---|---|
String |
build()
Builds and returns the token.
|
JWTService.JWTBuilder |
withClaim(String name,
Object value)
Adds a claim to the token to be built.
|
JWTService.JWTBuilder |
withTTL(int ttlSeconds)
Adds a TTL (in seconds) to the token to be built.
|
JWTService.JWTBuilder withTTL(int ttlSeconds)
A negative or zero TTL means to use the platform default.
ttlSeconds
- the TTL, in secondsJWTService.JWTBuilder withClaim(String name, Object value)
JWTClaims
.name
- the claim namevalue
- the claim valueString build()
The JWTClaims.CLAIM_SUBJECT
of the token is set to the current user id. The
JWTClaims.CLAIM_ISSUER
of the token is set to the string "nuxeo"
.
The token hash algorithm is based on a secret provided by the service configuration.
Copyright © 2018 Nuxeo. All rights reserved.