Class HttpClientBuilderExtensions
Provides extension methods for IHttpClientBuilder.
public static class HttpClientBuilderExtensions
- Inheritance
-
objectHttpClientBuilderExtensions
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
builderIHttpClientBuilderconfigureOptionsAction<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
builderIHttpClientBuilderconfigureOptionsFunc<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
builderIHttpClientBuilderuriUriThe 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.