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 TokenAuthenticationBuilderaddGroup(java.lang.String groupKey)The granted group access for this token.TokenAuthenticationBuilderaddGroups(java.util.Collection<java.lang.String> groupKeys)The granted groups access for this token.org.flowable.idm.api.Tokencreate()Create the token.TokenAuthenticationBuilderuserId(java.lang.String userId)The id of the user to which the token belongs.TokenAuthenticationBuildervalidFor(java.time.Duration validityDuration)The duration for which the token is valid.TokenAuthenticationBuildervalidUntil(java.time.Instant validUntil)Until when the token is valid.
-
-
-
Method Detail
-
userId
TokenAuthenticationBuilder userId(java.lang.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(java.lang.String groupKey)
The granted group access for this token.- Parameters:
groupKey- the key of the group
-
addGroups
TokenAuthenticationBuilder addGroups(java.util.Collection<java.lang.String> groupKeys)
The granted groups access for this token.- Parameters:
groupKeys- the group keys
-
validFor
TokenAuthenticationBuilder validFor(java.time.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(java.time.Instant validUntil)
Until when the token is valid. This is mutually exclusive withvalidFor(Duration).- Parameters:
validUntil- the date until the token is valid
-
create
org.flowable.idm.api.Token create()
Create the token. The value of the token should be retrieved throughToken.getTokenData().- Returns:
- the created token
-
-