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

Class ClientIdCredentials

A class providing an OAuth2 ClientId and Secret for authentication against the WhenFresh Api.

Inheritance
object
ClientIdCredentials
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 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>

Implements

IOAuth2Credentials