IActivityPermittedHandler

Namespace: ASPSecurityKit.AuthProviders
Assembly: ASPSecurityKit.dll

Summary

Provides an interface to perform activity-based, data-aware authorization check as part of authorization step of the security pipeline. To learn more, visit https://ASPSecurityKit.net/docs/the-security-pipeline/#activity-based-data-aware-authorization

Methods

IsPermitted(requestService)

Summary

Determines whether the current identity has the necessary permit to perform the specified request.

Returns

AuthResult instance with Code as Success if the current identity has the necessary permit; otherwise, a possible reason of failure.

Parameters
Name Type Description
requestService ASPSecurityKit.IRequestService The request service.
Exceptions
Type Description
System.ArgumentNullException When requestService is null.

IsPermittedAsync(requestService)

Summary

Determines whether the current identity has the necessary permit to perform the specified request.

Returns

AuthResult instance with Code as Success if the current identity has the necessary permit; otherwise, a possible reason of failure.

Parameters
Name Type Description
requestService ASPSecurityKit.IRequestService The request service.
Exceptions
Type Description
System.ArgumentNullException When requestService is null.

IsPermittedAsync(requestService,cancellationToken)

Summary

Determines whether the current identity has the necessary permit to perform the specified request.

Returns

AuthResult instance with Code as Success if the current identity has the necessary permit; otherwise, a possible reason of failure.

Parameters
Name Type Description
requestService ASPSecurityKit.IRequestService The request service.
cancellationToken System.Threading.CancellationToken The cancellation token.
Exceptions
Type Description
System.ArgumentNullException When requestService is null.