Class OAuth2SettingsOption
The settings used to validate the JWT bearer tokens received by the application and to obtain a token from them. Bound from the Authentication:OAuth2.Settings section by default.
They are registered as the SimpleKeyValueSettings named OAuth2 (see OAuth2SettingsExtension).
public class OAuth2SettingsOption
- Inheritance
-
OAuth2SettingsOption
- Inherited Members
Properties
Audiences
Gets or sets the accepted audiences. At least one is required when ValidateAudience is true.
public List<string> Audiences { get; set; }
Property Value
Authority
Gets or sets the authority of the tokens. When null, the default authority is used.
public AuthorityOptions? Authority { get; set; }
Property Value
ProviderId
Gets or sets the key of the token provider used to get the token of the caller. The default is Bootstrap (the token received in the request).
public string ProviderId { get; set; }
Property Value
Scopes
Gets or sets the scopes, used by the on-behalf-of scenario.
public List<string> Scopes { get; set; }
Property Value
ValidateAudience
Gets or sets a value indicating whether the audience of the token is validated. The default is true. Set it to false for identity providers, like Keycloak, that do not issue an audience by default.
public bool ValidateAudience { get; set; }