Table of Contents

Class BasicScenario

Namespace
Arc4u.OAuth2.TokenProvider.Scenarios
Assembly
Arc4u.OAuth2.AspNetCore.dll

grant_type=password style scenario taking the credential as a single Basic user:password pair. The pair is split into its User/Password parts at configuration time and projected into the keys consumed by the cache-backed CredentialTokenCacheTokenProvider, which performs the STS call and caches the resulting token.

Reads its values from the Settings bag.

Use the UserPasswordScenario instead when the user name and password are supplied as two separate fields.

public sealed class BasicScenario : IClientTokenScenario
Inheritance
BasicScenario
Implements
Inherited Members

Fields

Name

The discriminator under which this scenario is registered.

public const string Name = "Basic"

Field Value

string

Properties

KnownKeys

The keys in Settings this scenario consumes. Any other key present in Settings is forwarded verbatim to the token endpoint as an extra request parameter. Should use a case-insensitive comparer.

public IReadOnlyCollection<string> KnownKeys { get; }

Property Value

IReadOnlyCollection<string>

Methods

Validate(string, ClientTokenSettingsOptions)

Validates the bound options. Implementations throw a ConfigurationException when the configuration is invalid. Invoked eagerly, before the service provider is built.

public void Validate(string optionKey, ClientTokenSettingsOptions options)

Parameters

optionKey string
options ClientTokenSettingsOptions

WriteTo(string, ClientTokenSettingsOptions, SimpleKeyValueSettings)

Projects the bound options into the flat SimpleKeyValueSettings consumed by the token provider.

public void WriteTo(string optionKey, ClientTokenSettingsOptions options, SimpleKeyValueSettings settings)

Parameters

optionKey string
options ClientTokenSettingsOptions
settings SimpleKeyValueSettings