Class NullAuthorizationService
A null authorization service.
Inheritance
System.Object
NullAuthorizationService
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Security.Authorization
Assembly: Kephas.Core.dll
Syntax
[OverridePriority(Priority.Lowest)]
public class NullAuthorizationService : IAuthorizationService, ISyncAuthorizationService
Methods
| Improve this Doc View SourceAuthorize(IAuthorizationContext)
Query if the authorization context has the requested permission.
Declaration
public bool Authorize(IAuthorizationContext context)
Parameters
Type | Name | Description |
---|---|---|
IAuthorizationContext | context | The context. |
Returns
Type | Description |
---|---|
System.Boolean | True if permission is granted, false if not. |
AuthorizeAsync(IAuthorizationContext, CancellationToken)
Authorizes the provided context asynchronously.
Declaration
public Task<bool> AuthorizeAsync(IAuthorizationContext authContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IAuthorizationContext | authContext | Context for the authorization. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | An asynchronous result indicating whether the operation succeeded or not. |