Class EnvironmentProvidedCredentials
A class providing credentials stored in the environment for authentication against the WhenFresh Api.
Implements
Inherited Members
Namespace: WhenFresh.Api.Client.Authentication
Assembly: WhenFresh.Api.Client.dll
Syntax
public class EnvironmentProvidedCredentials : IOAuth2Credentials
  Remarks
Supports Refresh Token Credentials by setting a WF_REFRESH_TOKEN environment variable. Supports ClientId Credentials by setting WF_CLIENT_ID and WF_CLIENT_SECRET environment variables.
Constructors
EnvironmentProvidedCredentials()
A class providing credentials stored in the environment for authentication against the WhenFresh Api.
Declaration
public EnvironmentProvidedCredentials()
  Remarks
Supports Refresh Token Credentials by setting a WF_REFRESH_TOKEN environment variable. Supports ClientId Credentials by setting WF_CLIENT_ID and WF_CLIENT_SECRET environment variables.
Methods
GetTokenAsync(SendRequestDelegate, CancellationToken)
A class providing credentials stored in the environment for authentication against the WhenFresh Api.
Declaration
public Task<Token> GetTokenAsync(SendRequestDelegate client, CancellationToken cancellationToken)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SendRequestDelegate | client | |
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<Token> | 
Remarks
Supports Refresh Token Credentials by setting a WF_REFRESH_TOKEN environment variable. Supports ClientId Credentials by setting WF_CLIENT_ID and WF_CLIENT_SECRET environment variables.
