Interface ITokenHandler
This interface can be used to allow the AuthenticationHandler to request new and refreshed tokens by itself.
Namespace: Dangl.RestClient
Assembly: Dangl.RestClient.dll
Syntax
public interface ITokenHandler
Properties
| Improve this Doc View SourceCanGetToken
This should return true if this handler is capable of fulfulling the GetAndStoreTokenAsync() operation.
Declaration
bool CanGetToken { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanRefreshToken
This should return true if this handler is capable of fulfulling the RefreshAndStoreTokenAsync() operation.
Declaration
bool CanRefreshToken { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceGetAndStoreTokenAsync()
This obtains a new token and stores it in a ITokenStorage.
Declaration
Task<OAuthToken> GetAndStoreTokenAsync()
Returns
Type | Description |
---|---|
Task<OAuthToken> |
RefreshAndStoreTokenAsync()
This will refresh the token and store it in a ITokenStorage.
Declaration
Task<OAuthToken> RefreshAndStoreTokenAsync()
Returns
Type | Description |
---|---|
Task<OAuthToken> |