IConnectionAuthenticationRefreshFeature.OnAuthenticationRefreshed Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a callback to be invoked after authentication is refreshed.
public IDisposable OnAuthenticationRefreshed(Action<Microsoft.AspNetCore.Connections.Features.AuthenticationRefreshContext,object?> callback, object? state);
abstract member OnAuthenticationRefreshed : Action<Microsoft.AspNetCore.Connections.Features.AuthenticationRefreshContext, obj> * obj -> IDisposable
Public Function OnAuthenticationRefreshed (callback As Action(Of AuthenticationRefreshContext, Object), state As Object) As IDisposable
Parameters
- callback
- Action<AuthenticationRefreshContext,Object>
The callback to invoke with the refresh context and associated state.
- state
- Object
The state to pass to callback.
Returns
An IDisposable that can be disposed to unregister the callback.
Remarks
Callbacks should be quick and avoid blocking; the callback is invoked on the thread that performed the update. Exceptions thrown from callbacks are not propagated to the caller of the update. The previous principal may own resources that are disposed when the authentication-refresh request completes, so callbacks must not access PreviousUser after returning.