Namespace Arc4u.OAuth2.TokenProvider.Scenarios
Classes
- BasicScenario
grant_type=passwordstyle scenario taking the credential as a single Basicuser:passwordpair. The pair is split into itsUser/Passwordparts 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_credentialsscenario: a ClientId + ClientSecret pair. Any other key in Settings (e.g. the Logto.ioresourceindicator) is not claimed by this scenario and is forwarded to the token endpoint as an extra parameter.
- ExtraParametersEncoder
Serializes the open
ExtraParametersbag 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=passwordstyle scenario taking the user name and password as two separate fields. The values are projected into theUser/Passwordkeys 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.