public interface TokenAuthenticationBuilder
| Modifier and Type | Method and Description |
|---|---|
TokenAuthenticationBuilder |
addGroup(String groupKey)
The granted group access for this token.
|
TokenAuthenticationBuilder |
addGroups(Collection<String> groupKeys)
The granted groups access for this token.
|
Token |
create()
Create the token.
|
TokenAuthenticationBuilder |
userId(String userId)
The id of the user to which the token belongs.
|
TokenAuthenticationBuilder |
validFor(Duration validityDuration)
The duration for which the token is valid.
|
TokenAuthenticationBuilder |
validUntil(Instant validUntil)
Until when the token is valid.
|
TokenAuthenticationBuilder userId(String userId)
userId - the id of the userTokenAuthenticationBuilder addGroup(String groupKey)
groupKey - the key of the groupTokenAuthenticationBuilder addGroups(Collection<String> groupKeys)
groupKeys - the group keysTokenAuthenticationBuilder validFor(Duration validityDuration)
validUntil(Instant).validityDuration - the positive durationTokenAuthenticationBuilder validUntil(Instant validUntil)
validFor(Duration).validUntil - the date until the token is validToken create()
Token.getTokenData().