EnvironmentCredentialStore
Namespace: E2E.OAuth
public sealed class EnvironmentCredentialStore : ICredentialStoreCredentials from EnvironmentVariable: readable everywhere, changed nowhere.
Inheritance: object
Implements: ICredentialStore
Constructors
Section titled “Constructors”EnvironmentCredentialStore(string)
Section titled “EnvironmentCredentialStore(string)”public EnvironmentCredentialStore(string json)Parameters
| Name | Type | Description |
|---|---|---|
json |
string |
Methods
Section titled “Methods”GetAsync(string, CancellationToken)
Section titled “GetAsync(string, CancellationToken)”public Task<OAuthCredentials?> GetAsync(string providerId, CancellationToken cancellationToken = default)Parameters
| Name | Type | Description |
|---|---|---|
providerId |
string | |
cancellationToken |
CancellationToken |
Returns: Task<OAuthCredentials>
ListAsync(CancellationToken)
Section titled “ListAsync(CancellationToken)”public Task<IReadOnlyList<string>> ListAsync(CancellationToken cancellationToken = default)Every provider id with stored credentials.
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken |
CancellationToken |
Returns: Task<IReadOnlyList<string>>
RemoveAsync(string, CancellationToken)
Section titled “RemoveAsync(string, CancellationToken)”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>
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