Class NullAuthenticationService
A null security service.
Inheritance
Inherited Members
Namespace: Kephas.Security.Authentication
Assembly: Kephas.Core.dll
Syntax
[OverridePriority(Priority.Lowest)]
public class NullAuthenticationService : IAuthenticationService, ISyncAuthenticationService
Methods
| Improve this Doc View SourceAuthenticate(IAuthenticationContext)
Authenticates the user.
Declaration
public IIdentity Authenticate(IAuthenticationContext authContext)
Parameters
Type | Name | Description |
---|---|---|
IAuthenticationContext | authContext | Context for the authentication. |
Returns
Type | Description |
---|---|
System.Security.Principal.IIdentity | The identity. |
AuthenticateAsync(IAuthenticationContext, CancellationToken)
Authenticates the user asynchronously.
Declaration
public 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. |
GetIdentity(Object, IContext)
Gets the identity for the provided token.
Declaration
public IIdentity GetIdentity(object token, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | token | The token. |
IContext | context | The requiring context (optional). |
Returns
Type | Description |
---|---|
System.Security.Principal.IIdentity | The identity. |
GetIdentityAsync(Object, IContext, CancellationToken)
Gets asynchronously the identity for the provided token.
Declaration
public 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. |
GetToken(IIdentity, IContext)
Gets a token for the provided identity.
Declaration
public object GetToken(IIdentity identity, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Principal.IIdentity | identity | The identity. |
IContext | context | The requiring context (optional). |
Returns
Type | Description |
---|---|
System.Object | The token. |
GetTokenAsync(IIdentity, IContext, CancellationToken)
Gets asynchronously a token for the provided identity.
Declaration
public 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. |