Interface IHeadlessTokenManager
Provides management methods for handling HeadlessTokenInfo.
public interface IHeadlessTokenManager
- Extension Methods
Methods
AssignToken(HeadlessTokenInfo, CancellationToken)
Creates, assigns and returns api key to the headless token.
Task<string> AssignToken(HeadlessTokenInfo info, CancellationToken cancellationToken = default)
Parameters
info
HeadlessTokenInfoHeadless token info to be updated.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<string>
Token value.
Create(CreateHeadlessTokenParameters)
Creates a new HeadlessTokenInfo.
int Create(CreateHeadlessTokenParameters itemParameters)
Parameters
itemParameters
CreateHeadlessTokenParameters
Returns
- int
ID of the newly created info.
Delete(int, CancellationToken)
Deletes a Headless token.
Task Delete(int tokenId, CancellationToken cancellationToken = default)
Parameters
tokenId
intId of the token to be deleted.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task
Get(int, CancellationToken)
Gets the HeadlessTokenInfo by ID.
Task<HeadlessTokenInfo> Get(int tokenId, CancellationToken cancellationToken = default)
Parameters
tokenId
intId of the token to be retrieved.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<HeadlessTokenInfo>
InitializeInfoObject(HeadlessTokenInfo, CreateHeadlessTokenParameters)
Initializes the HeadlessTokenInfo object.
bool InitializeInfoObject(HeadlessTokenInfo info, CreateHeadlessTokenParameters tokenParameters)
Parameters
info
HeadlessTokenInfoPartial HeadlessTokenInfo.
tokenParameters
CreateHeadlessTokenParametersToken parameter.
Returns
- bool
True on success.
Update(HeadlessTokenInfo, CancellationToken)
Updates the HeadlessTokenInfo.
Task Update(HeadlessTokenInfo updatedInfo, CancellationToken cancellationToken = default)
Parameters
updatedInfo
HeadlessTokenInfoHeadless token info to be updated.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task