Class ClientIdCredentials
A class providing an OAuth2 ClientId and Secret for authentication against the WhenFresh Api.
Implements
Inherited Members
Namespace: WhenFresh.Api.Client.Authentication
Assembly: WhenFresh.Api.Client.dll
Syntax
public class ClientIdCredentials : IOAuth2Credentials
Constructors
ClientIdCredentials(string, string)
Initializes a new instance of the ClientIdCredentials class.
Declaration
public ClientIdCredentials(string clientId, string secret)
Parameters
| Type | Name | Description |
|---|---|---|
| string | clientId | The OAuth2 Client ID |
| string | secret | The OAuth2 Client Secret |
Properties
ClientId
The OAuth2 Client ID
Declaration
public string ClientId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Secret
The OAuth2 Client Secret
Declaration
public string Secret { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetTokenAsync(SendRequestDelegate, CancellationToken)
A class providing an OAuth2 ClientId and Secret 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> |
