Skip to content

RefreshAsync Method ​

Definition ​

  • Namespace: JASE.ServiceNow
  • Assembly: JASE.ServiceNow.dll

Task<bool> RefreshAsync(AuthenticationToken token, string clientId, string clientSecret, CancellationToken cancellationToken = null) ​

csharp
Task<bool> RefreshAsync(AuthenticationToken token, string clientId, string clientSecret, CancellationToken cancellationToken = null)

Requests a new access token using the refresh_token grant and updates the token in-place. Returns false if no refresh token is available or if the refresh attempt fails.

Parameters ​

NameDescription
cancellationTokenToken used to cancel the request.
clientIdOAuth client ID from the Application Registry.
clientSecretOAuth client secret from the Application Registry.
tokenExisting AuthenticationToken to refresh.

Returns ​

True when a new token was obtained and applied to this instance; otherwise false.