Interface IAuthenticationService
Singleton application service contract for handing authentication.
Namespace: Kephas.Security.Authentication
Assembly: Kephas.Core.dll
Syntax
[SingletonAppServiceContract]
public interface IAuthenticationServiceMethods
| Improve this Doc View SourceAuthenticateAsync(IAuthenticationContext, CancellationToken)
Authenticates the user asynchronously.
Declaration
Task<IIdentity> AuthenticateAsync(IAuthenticationContext authContext, CancellationToken cancellationToken = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| IAuthenticationContext | authContext | Context for the authentication. | 
| System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Security.Principal.IIdentity> | An asynchronous result that yields the identity. | 
GetIdentityAsync(Object, IContext, CancellationToken)
Gets asynchronously the identity for the provided token.
Declaration
Task<IIdentity> GetIdentityAsync(object token, IContext context = null, CancellationToken cancellationToken = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | token | The token. | 
| IContext | context | The requiring context (optional). | 
| System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Security.Principal.IIdentity> | An asynchronous result that yields the identity. | 
GetTokenAsync(IIdentity, IContext, CancellationToken)
Gets asynchronously a token for the provided identity.
Declaration
Task<object> GetTokenAsync(IIdentity identity, IContext context = null, CancellationToken cancellationToken = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Security.Principal.IIdentity | identity | The identity. | 
| IContext | context | The requiring context (optional). | 
| System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Object> | An asynchronous result that yields the token. |