AuthenticationTokenController is defined in the Telligent.Evolution.Extensibility.Authentication.Version2 namespace.
Definition
class AuthenticationTokenController
{
AuthenticationTokenController(Guid providerId);
Func<ExpiredAuthenticationTokenOptions,Task<ExpiredAuthenticationTokenResponse>> AuthenticationTokenExpired { get; set; }
Func<RevokeAuthenticationTokenOptions,Task> AuthenticationTokenRevoked { get; set; }
void AddAuthenticationToken(Guid userId, string token, AuthenticationTokenCreateOptions options = null);
Task<AuthenticationToken> GetUserTokenAsync(Guid userId, AuthenticationTokenGetOptions options = null);
void RevokeAllTokens();
Task RevokeAuthenticationToken(Guid userId, CancellationToken token = null);
}
Constructors
AuthenticationTokenController(Guid providerId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| providerId | Guid | Provider Id | Required |
Properties
| Name | Type | Description | Default | Options |
|---|---|---|---|---|
| AuthenticationTokenExpired | Func<ExpiredAuthenticationTokenOptions,Task<ExpiredAuthenticationTokenResponse>> | |||
| AuthenticationTokenRevoked | Func<RevokeAuthenticationTokenOptions,Task> |
Methods
void AddAuthenticationToken(Guid userId, string token, AuthenticationTokenCreateOptions options = null);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| userId | Guid | User Id | Required | ||
| token | string | Token | Required | ||
| options | AuthenticationTokenCreateOptions | Options | Optional |
Task<AuthenticationToken> GetUserTokenAsync(Guid userId, AuthenticationTokenGetOptions options = null);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| userId | Guid | User Id | Required | ||
| options | AuthenticationTokenGetOptions | Options | Optional |
Return Type
void RevokeAllTokens();
Task RevokeAuthenticationToken(Guid userId, CancellationToken token = null);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| userId | Guid | User Id | Required | ||
| token | CancellationToken | Token | Optional |