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
builderIHttpClientBuilderThe builder to apply the configuration to.
configureOptionsAction<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
builderIHttpClientBuilderThe builder to apply the configuration to.
configureOptionsFunc<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
builderIHttpClientBuilderThe builder to apply the configuration to.
uriUriThe URI of the identity server to request an authentication token from.
clientIdstringThe client identifier to present to the identity server.
clientSecretstringThe client secret to present to the identity server.