Package com.flowable.core.idm.api
Interface TokenAuthenticationBuilder
-
- All Known Implementing Classes:
TokenAuthenticationBuilderImpl
public interface TokenAuthenticationBuilder
- Author:
- Filip Hrisafov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
userId
TokenAuthenticationBuilder userId(String userId)
The id of the user to which the token belongs. This can be any user which isn't part of the Flowable Identity Service.- Parameters:
userId
- the id of the user
-
addGroup
TokenAuthenticationBuilder addGroup(String groupKey)
The granted group access for this token.- Parameters:
groupKey
- the key of the group
-
addGroups
TokenAuthenticationBuilder addGroups(Collection<String> groupKeys)
The granted groups access for this token.- Parameters:
groupKeys
- the group keys
-
validFor
TokenAuthenticationBuilder validFor(Duration validityDuration)
The duration for which the token is valid. It must be a positive duration. This is mutually exclusive withvalidUntil(Instant)
.- Parameters:
validityDuration
- the positive duration
-
validUntil
TokenAuthenticationBuilder validUntil(Instant validUntil)
Until when the token is valid. This is mutually exclusive withvalidFor(Duration)
.- Parameters:
validUntil
- the date until the token is valid
-
create
Token create()
Create the token. The value of the token should be retrieved throughToken.getTokenData()
.- Returns:
- the created token
-
-