Class HttpClientBuilderExtensions
Provides extension methods for IHttpClientBuilder.
public static class HttpClientBuilderExtensions
- Inheritance
-
HttpClientBuilderExtensions
- Inherited Members
Methods
AddOAuthHandler(IHttpClientBuilder, Action<OAuthOptions>)
Adds an HTTP message delegating handler that transparently performs OAuth 2.0 authentication with a client secret.
public static IHttpClientBuilder AddOAuthHandler(this IHttpClientBuilder builder, Action<OAuthOptions> configureOptions)
Parameters
builder
IHttpClientBuilderThe builder to apply the configuration to.
configureOptions
Action<OAuthOptions>A delegate that is used to configure OAuthOptions.
Returns
AddOAuthHandler(IHttpClientBuilder, Func<IServiceProvider, OAuthOptions>)
Adds an HTTP message delegating handler that transparently performs OAuth 2.0 authentication with a client secret.
public static IHttpClientBuilder AddOAuthHandler(this IHttpClientBuilder builder, Func<IServiceProvider, OAuthOptions> configureOptions)
Parameters
builder
IHttpClientBuilderThe builder to apply the configuration to.
configureOptions
Func<IServiceProvider, OAuthOptions>A delegate that is used to provide OAuthOptions.
Returns
AddOAuthHandler(IHttpClientBuilder, Uri, string, string)
Adds an HTTP message delegating handler that transparently performs OAuth 2.0 authentication with a client secret.
public static IHttpClientBuilder AddOAuthHandler(this IHttpClientBuilder builder, Uri uri, string clientId, string clientSecret)
Parameters
builder
IHttpClientBuilderThe builder to apply the configuration to.
uri
UriThe URI of the identity server to request an authentication token from.
clientId
stringThe client identifier to present to the identity server.
clientSecret
stringThe client secret to present to the identity server.