Class ExposeBackOfficeAuthenticationOpenIddictServerEventsHandler
Provides OpenIddict server event handlers to expose the backoffice authentication token via a custom authentication scheme.
Inheritance
object
Namespace: Umbraco.Cms.Infrastructure.Security
Assembly: Umbraco.Cms.Api.Common.dll
Syntax
public class ExposeBackOfficeAuthenticationOpenIddictServerEventsHandler
Constructors
View SourceExposeBackOfficeAuthenticationOpenIddictServerEventsHandler(IHttpContextAccessor, IOptions<GlobalSettings>, IOptions<BackOfficeIdentityOptions>)
Initializes a new instance of the ExposeBackOfficeAuthenticationOpenIddictServerEventsHandler class.
Declaration
public ExposeBackOfficeAuthenticationOpenIddictServerEventsHandler(IHttpContextAccessor httpContextAccessor, IOptions<GlobalSettings> globalSettings, IOptions<BackOfficeIdentityOptions> backOfficeIdentityOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| IHttpContextAccessor | httpContextAccessor | |
| IOptions<GlobalSettings> | globalSettings | |
| IOptions<BackOfficeIdentityOptions> | backOfficeIdentityOptions |
Methods
View SourceHandleAsync(ApplyRevocationResponseContext)
Processes the event.
Declaration
public ValueTask HandleAsync(OpenIddictServerEvents.ApplyRevocationResponseContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| OpenIddictServerEvents.ApplyRevocationResponseContext | context | The context associated with the event to process. |
Returns
| Type | Description |
|---|---|
| ValueTask | A System.Threading.Tasks.ValueTask that can be used to monitor the asynchronous operation. |
Remarks
Event handler for when access tokens are revoked.
HandleAsync(GenerateTokenContext)
Processes the event.
Declaration
public ValueTask HandleAsync(OpenIddictServerEvents.GenerateTokenContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| OpenIddictServerEvents.GenerateTokenContext | context | The context associated with the event to process. |
Returns
| Type | Description |
|---|---|
| ValueTask | A System.Threading.Tasks.ValueTask that can be used to monitor the asynchronous operation. |
Remarks
Event handler for when access tokens are generated (created or refreshed).