Hub.OnAuthenticationRefreshedAsync 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.
Called when the authenticated user on the connection has been refreshed, for example via the SignalR authentication-refresh endpoint. The new ClaimsPrincipal is available on User.
public virtual System.Threading.Tasks.Task OnAuthenticationRefreshedAsync();
abstract member OnAuthenticationRefreshedAsync : unit -> System.Threading.Tasks.Task
override this.OnAuthenticationRefreshedAsync : unit -> System.Threading.Tasks.Task
Public Overridable Function OnAuthenticationRefreshedAsync () As Task
Returns
A Task that represents the asynchronous operation.
Remarks
This method is serialized with concurrent hub method invocations using the connection's maximum-parallel-invocation limit. Client-result invocations are not supported from this method. The previous principal is intentionally not exposed because its underlying resources (for example a WindowsIdentity's SafeHandle) may already be disposed by the time this method runs. Authentication refresh does not change UserIdentifier or rekey SignalR user routing. Clients.User(...) remains associated with the identifier established when the connection started. Reconnect the client to change its routing identifier.