Appearance
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
| Name | Description |
|---|---|
cancellationToken | Token used to cancel the request. |
clientId | OAuth client ID from the Application Registry. |
clientSecret | OAuth client secret from the Application Registry. |
token | Existing AuthenticationToken to refresh. |
Returns
True when a new token was obtained and applied to this instance; otherwise false.