Language

IConnectionAuthenticationRefreshFeature.OnAuthenticationRefresh Property

Definition

Gets or sets the callback invoked before authentication is refreshed.

public Func<Microsoft.AspNetCore.Connections.Features.AuthenticationRefreshContext,System.Threading.Tasks.Task<bool>> OnAuthenticationRefresh { get; set; }
member this.OnAuthenticationRefresh : Func<Microsoft.AspNetCore.Connections.Features.AuthenticationRefreshContext, System.Threading.Tasks.Task<bool>> with get, set
Public Property OnAuthenticationRefresh As Func(Of AuthenticationRefreshContext, Task(Of Boolean))

Property Value

Remarks

The callback must return true for the refresh to proceed. It is invoked without holding the user update lock and may perform asynchronous work, but should complete quickly. An exception thrown by the callback rejects the refresh and is not propagated to the caller. Setting this property replaces any previously configured callback.

Applies to