Skip to content

EnvironmentCredentialStore

Namespace: E2E.OAuth

public sealed class EnvironmentCredentialStore : ICredentialStore

Credentials from EnvironmentVariable: readable everywhere, changed nowhere.

Inheritance: object

Implements: ICredentialStore

View source

public EnvironmentCredentialStore(string json)

Parameters

Name Type Description
json string

View source

public Task<OAuthCredentials?> GetAsync(string providerId, CancellationToken cancellationToken = default)

Parameters

Name Type Description
providerId string
cancellationToken CancellationToken

Returns: Task<OAuthCredentials>

View source

public Task<IReadOnlyList<string>> ListAsync(CancellationToken cancellationToken = default)

Every provider id with stored credentials.

Parameters

Name Type Description
cancellationToken CancellationToken

Returns: Task<IReadOnlyList<string>>

View source

public Task<bool> RemoveAsync(string providerId, CancellationToken cancellationToken = default)

Forgets the login. True when one was stored.

Parameters

Name Type Description
providerId string
cancellationToken CancellationToken

Returns: Task<bool>

View source

SetAsync(string, OAuthCredentials, CancellationToken)

Section titled “SetAsync(string, OAuthCredentials, CancellationToken)”
public Task SetAsync(string providerId, OAuthCredentials credentials, CancellationToken cancellationToken = default)

Parameters

Name Type Description
providerId string
credentials OAuthCredentials
cancellationToken CancellationToken

Returns: Task

View source