public AzureAdAuthenticatedHttpMessageHandler(AzureAdAuthenticatedHttpClientOptions options) { Contract.Requires(options != null); _resourceId = options.ResourceId; var authority = String.Format(CultureInfo.InvariantCulture, options.AadInstance, options.Tenant); _authContext = new AuthenticationContext(authority); _clientCredential = new ClientCredential(options.ClientId, options.AppKey); }
public static HttpClient GetClient(AzureAdAuthenticatedHttpClientOptions options) { var msgHandler = new AzureAdAuthenticatedHttpMessageHandler(options); return(new HttpClient(msgHandler)); }
public AzureAdAuthenticatedHttpMessageHandler( AzureAdAuthenticatedHttpClientOptions options, HttpMessageHandler innerHandler) : this(options) { InnerHandler = innerHandler; }