Package com.flowable.core.idm.api
Interface AccessTokenBuilder
- All Known Implementing Classes:
AccessTokenBuilderImpl
public interface AccessTokenBuilder
- Author:
- Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create the token.description
(String description) The optional description that should be used for the token.The name that should be used for the token.The id of the tenant to which the token belongs.The id of the user to which the token belongs.The duration for which the token is valid.validUntil
(Instant validUntil) Until when the token is valid.
-
Method Details
-
userId
The id of the user to which the token belongs. This can be any user which isn't part of the Identity Service.- Parameters:
userId
- the id of the user
-
tenantId
The id of the tenant to which the token belongs.- Parameters:
tenantId
- the id of the user
-
name
The name that should be used for the token.- Parameters:
name
- the name for the token
-
description
The optional description that should be used for the token.- Parameters:
description
- the description for the token
-
validFor
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
Until when the token is valid. This is mutually exclusive withvalidFor(Duration)
.- Parameters:
validUntil
- the date until the token is valid
-
create
NewAccessToken create()Create the token. The user visible value of the token should be retrieved throughNewAccessToken.getPlainTextValue()
.- Returns:
- the created token
-