HubConnection.RefreshAuthenticationAsync(CancellationToken) 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.
Sends a POST to the server's /refresh endpoint to refresh the authentication token. The server re-authenticates and updates the connection's ClaimsPrincipal. Returns the updated token lifetime, or null if not provided.
public System.Threading.Tasks.Task<TimeSpan?> RefreshAuthenticationAsync(System.Threading.CancellationToken cancellationToken = default);
member this.RefreshAuthenticationAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Nullable<TimeSpan>>
Public Function RefreshAuthenticationAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Nullable(Of TimeSpan))
Parameters
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests.
Returns
The new token lifetime from the server, or null.