IAuthenticationProvider
Members
Namespace: ASPSecurityKit.AuthProviders
Assembly: ASPSecurityKit.dll
Summary
Provides an interface to perform the authentication step of the security pipeline. To learn more, visit https://ASPSecurityKit.net/docs/the-security-pipeline/#authentication
Methods
Authenticate(requestService)
Summary
Authenticates the specified request. To learn more about the flow of the default implementation, visit https://ASPSecurityKit.net/docs/the-security-pipeline/#authentication
Returns
AuthResult instance with Code as Success if authentication was successful; 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. | 
Remarks
The method doesn’t just authenticate but also loads a session for the authenticated identity including user, permits and anything else needed by the subsequent steps.
HandleUnauthenticatedRequest(requestService,result)
Summary
Handles response when request couldn’t be authenticated.
Parameters
| Name | Type | Description | 
|---|---|---|
| requestService | ASPSecurityKit.IRequestService | The request service. | 
| result | ASPSecurityKit.AuthProviders.AuthResult | The result instance with failure details. | 
Exceptions
| Type | Description | 
|---|---|
| System.ArgumentNullException | When requestService/result is null. | 
| System.ArgumentException | When result is not a failed one. | 
AuthenticateAsync(requestService)
Summary
Authenticates the specified request. To learn more about the flow of the default implementation, visit https://ASPSecurityKit.net/docs/the-security-pipeline/#authentication
Returns
AuthResult instance with Code as Success if authentication was successful; 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. | 
Remarks
The method doesn’t just authenticate but also loads a session for the authenticated identity including user, permits and anything else needed by the subsequent steps.
AuthenticateAsync(requestService,cancellationToken)
Summary
Authenticates the specified request. To learn more about the flow of the default implementation, visit https://ASPSecurityKit.net/docs/the-security-pipeline/#authentication
Returns
AuthResult instance with Code as Success if authentication was successful; 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. | 
Remarks
The method doesn’t just authenticate but also loads a session for the authenticated identity including user, permits and anything else needed by the subsequent steps.
HandleUnauthenticatedRequestAsync(requestService,result)
Summary
Handles response when request couldn’t be authenticated.
Parameters
| Name | Type | Description | 
|---|---|---|
| requestService | ASPSecurityKit.IRequestService | The request service. | 
| result | ASPSecurityKit.AuthProviders.AuthResult | The result instance with failure details. | 
Exceptions
| Type | Description | 
|---|---|
| System.ArgumentNullException | When requestService/result is null. | 
| System.ArgumentException | When result is not a failed one. | 
HandleUnauthenticatedRequestAsync(requestService,result,cancellationToken)
Summary
Handles response when request couldn’t be authenticated.
Parameters
| Name | Type | Description | 
|---|---|---|
| requestService | ASPSecurityKit.IRequestService | The request service. | 
| result | ASPSecurityKit.AuthProviders.AuthResult | The result instance with failure details. | 
| cancellationToken | System.Threading.CancellationToken | The cancellation token. | 
Exceptions
| Type | Description | 
|---|---|
| System.ArgumentNullException | When requestService/result is null. | 
| System.ArgumentException | When result is not a failed one. |