Table of Contents

Namespace Arc4u.OAuth2.TokenProvider.Scenarios

Classes

BasicScenario

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.

ClientCredentialsScenario

grant_type=client_credentials scenario: a ClientId + ClientSecret pair. Any other key in Settings (e.g. the Logto.io resource indicator) is not claimed by this scenario and is forwarded to the token endpoint as an extra parameter.

ExtraParametersEncoder

Serializes the open ExtraParameters bag into a single form-url-encoded value so it survives the flat SimpleKeyValueSettings (a string/string dictionary), and decodes it back on the token provider side when building the request to the token endpoint.

UserPasswordScenario

grant_type=password style scenario taking the user name and password as two separate fields. The values are projected into the User/Password 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 BasicScenario instead when the credential is supplied as a single user:password (Basic) pair.

Interfaces

IClientTokenScenario

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.