ITokenService Interface
Assembly: PTS.Modules.IdentityTokenExtension.dll
Syntax
public interface ITokenService
Methods
AddAccessToken(Identity, TokenType, TokenStatus, Nullable<DateTime>, Nullable<DateTime>)
Declaration
Token AddAccessToken(Identity identity, TokenType type, TokenStatus status = TokenStatus.NotSet, DateTime? activeFrom = default(DateTime? ), DateTime? activeUntil = default(DateTime? ))
Parameters
Type |
Name |
Description |
Identity |
identity |
|
TokenType |
type |
|
TokenStatus |
status |
|
System.Nullable<System.DateTime> |
activeFrom |
|
System.Nullable<System.DateTime> |
activeUntil |
|
Returns
AddAccessTokenAsync(Identity, TokenType, TokenStatus, Nullable<DateTime>, Nullable<DateTime>)
Declaration
Task<Token> AddAccessTokenAsync(Identity identity, TokenType type, TokenStatus status = TokenStatus.NotSet, DateTime? activeFrom = default(DateTime? ), DateTime? activeUntil = default(DateTime? ))
Parameters
Type |
Name |
Description |
Identity |
identity |
|
TokenType |
type |
|
TokenStatus |
status |
|
System.Nullable<System.DateTime> |
activeFrom |
|
System.Nullable<System.DateTime> |
activeUntil |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Token> |
|
GetAccessTokens(Identity, Nullable<TokenType>, Nullable<TokenStatus>)
Declaration
List<Token> GetAccessTokens(Identity identity, TokenType? type = default(TokenType? ), TokenStatus? status = default(TokenStatus? ))
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<Token> |
|
GetAccessTokensAsync(Identity, Nullable<TokenType>, Nullable<TokenStatus>)
Declaration
Task<List<Token>> GetAccessTokensAsync(Identity identity, TokenType? type = default(TokenType? ), TokenStatus? status = default(TokenStatus? ))
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<Token>> |
|
GetActiveAccessToken(Identity, Nullable<TokenType>)
Declaration
Token GetActiveAccessToken(Identity identity, TokenType? type = default(TokenType? ))
Parameters
Returns
GetActiveAccessTokenAsync(Identity, Nullable<TokenType>)
Declaration
Task<Token> GetActiveAccessTokenAsync(Identity identity, TokenType? type = default(TokenType? ))
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<Token> |
|
IsTokenValid(Token)
Declaration
bool IsTokenValid(Token token)
Parameters
Type |
Name |
Description |
Token |
token |
|
Returns
Type |
Description |
System.Boolean |
|
Extension Methods