IAuthorizeRequestDefinition

Namespace: ASPSecurityKit.Net
Assembly: ASPSecurityKit.Net.dll

Summary

Represents auth definition to provide authorization related methods for an action.

Properties

CanAuthorize

Summary

Gets a value indicating whether this instance can authorize the associated action.

Value

true if this instance can authorize the associated action; otherwise, false.

Methods

IsAuthorized(parameters)

Summary

Determines whether or not given action is authorized.

Returns

AuthResult instance with Code as Success if the given request is authorized; otherwise, a possible reason of failure.

Parameters
Name Type Description
parameters System.Object[] The parameters.
Exceptions
Type Description
System.InvalidOperationException When no authorizer is registered.

IsAuthorizedAsync(parameters)

Summary

Determines whether or not given action is authorized.

Returns

AuthResult instance with Code as Success if the given request is authorized; otherwise, a possible reason of failure.

Parameters
Name Type Description
parameters System.Object[] The parameters.
Exceptions
Type Description
System.InvalidOperationException When no authorizer is registered.

IsAuthorizedAsync(parameters,cancellationToken)

Summary

Determines whether or not given action is authorized.

Returns

AuthResult instance with Code as Success if the given request is authorized; otherwise, a possible reason of failure.

Parameters
Name Type Description
parameters System.Object[] The parameters.
cancellationToken System.Threading.CancellationToken The cancellation token.
Exceptions
Type Description
System.InvalidOperationException When no authorizer is registered.