• Home
  • My Account
  • Docs
  • Catalog Browser
  • API Status
Show / Hide Table of Contents

Class EnvironmentProvidedCredentials

A class providing credentials stored in the environment for authentication against the WhenFresh Api.

Inheritance
object
EnvironmentProvidedCredentials
Implements
IOAuth2Credentials
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
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.

Implements

IOAuth2Credentials