Interface IClientTokenScenario
- Namespace
- Arc4u.OAuth2.TokenProvider.Scenarios
- Assembly
- Arc4u.OAuth2.AspNetCore.dll
A client token acquisition scenario.
Each scenario owns the variability of one client token shape: its validation rules, the
ProviderId (token provider) that handles it, and how it projects the bound
ClientTokenSettingsOptions into a flat SimpleKeyValueSettings.
Scenarios are selected by the Scenario discriminator
through the Scenario resolver function.
public interface IClientTokenScenario
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.
IReadOnlyCollection<string> KnownKeys { get; }
Property Value
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.
void Validate(string optionKey, ClientTokenSettingsOptions options)
Parameters
optionKeystringoptionsClientTokenSettingsOptions
WriteTo(string, ClientTokenSettingsOptions, SimpleKeyValueSettings)
Projects the bound options into the flat SimpleKeyValueSettings consumed by the token provider.
void WriteTo(string optionKey, ClientTokenSettingsOptions options, SimpleKeyValueSettings settings)
Parameters
optionKeystringoptionsClientTokenSettingsOptionssettingsSimpleKeyValueSettings