Class RefreshTokenCredentials
A class providing an OAuth2 Refresh Token for authentication against the WhenFresh Api.
Implements
Inherited Members
Namespace: WhenFresh.Api.Client.Authentication
Assembly: WhenFresh.Api.Client.dll
Syntax
public class RefreshTokenCredentials : IOAuth2Credentials
Constructors
RefreshTokenCredentials(string)
Initializes a new instance of the RefreshTokenCredentials class.
Declaration
public RefreshTokenCredentials(string refreshToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | refreshToken | The OAuth2 Refresh Token |
RefreshTokenCredentials(string, string)
A class providing an OAuth2 Refresh Token for authentication against the WhenFresh Api.
Declaration
public RefreshTokenCredentials(string refreshToken, string clientId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | refreshToken | |
| string | clientId |
Properties
ClientId
A class providing an OAuth2 Refresh Token for authentication against the WhenFresh Api.
Declaration
public string ClientId { get; }
Property Value
| Type | Description |
|---|---|
| string |
RefreshToken
A class providing an OAuth2 Refresh Token for authentication against the WhenFresh Api.
Declaration
public string RefreshToken { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetTokenAsync(SendRequestDelegate, CancellationToken)
A class providing an OAuth2 Refresh Token for authentication against the WhenFresh Api.
Declaration
public Task<Token> GetTokenAsync(SendRequestDelegate client, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| SendRequestDelegate | client | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Token> |
