Table of Contents

Class OnBehalfOfSettingsOptions

Namespace
Arc4u.OAuth2.Options
Assembly
Arc4u.OAuth2.AspNetCore.Authentication.dll

The settings of an on-behalf-of token request. The entries of the Authentication:OnBehalfOf section are bound to this class; each one is registered as a SimpleKeyValueSettings named as the entry.

public class OnBehalfOfSettingsOptions
Inheritance
OnBehalfOfSettingsOptions
Inherited Members

Properties

AuthenticationType

Gets or sets the authentication type of the resulting identity. The default is InjectAuthenticationType.

public string AuthenticationType { get; set; }

Property Value

string

ClientId

Gets or sets the client id of the application. Required.

public string ClientId { get; set; }

Property Value

string

ClientSecret

Gets or sets the client secret of the application. Required.

public string ClientSecret { get; set; }

Property Value

string

HttpClientName

Gets or sets the name of the HttpClient of the IHttpClientFactory that calls the token endpoint, for example to configure a proxy or the Windows authentication of the token endpoint. When empty, the default client of the factory is used (a shared client when no factory is registered).

public string? HttpClientName { get; set; }

Property Value

string

ProviderId

Gets or sets the key of the token provider that performs the request. The default is ProviderName (Obo).

public string ProviderId { get; set; }

Property Value

string

Scopes

Gets or sets the scopes requested for the downstream API. At least one is required.

public List<string> Scopes { get; set; }

Property Value

List<string>

TokenCache

Gets or sets the cache in which the tokens of this setting are stored and for how long. When present, it is registered as named TokenCacheOptions under the setting name. In the configuration, a value that is not given (CacheName or MaxTime) is taken from the Authentication:OnBehalfOfCache section when it exists, otherwise from the default TokenCacheOptions (Authentication:TokenCache); when absent, the setting uses the Authentication:OnBehalfOfCache section, or the default options when there is none. From code (AddOnBehalfOfSettings), an empty CacheName takes the one of the default options, the MaxTime of the instance is used, and the Authentication:OnBehalfOfCache section does not apply.

public TokenCacheOptions? TokenCache { get; set; }

Property Value

TokenCacheOptions