Skip to content

droosma/OAuth.HttpClient

Repository files navigation

OAuth.HttpClient

A DelegatingHandler implementation that abstracts away some of the authentication handshake logic like requesting the jwt token caching, and refreshing it.

NuGet version (ResilientOAuth.HttpClient)

Usage

    public void ConfigureServices(IServiceCollection services)
    {
        var settings = new Settings(clientId: "id",
                                    clientSecret: "secret",
                                    scope: "role:app",
                                    endpoint: new Uri("https://authority.local"),
                                    expireMargin: TimeSpan.FromMinutes(10));
        services.AddHttpClient("authenticatedHttpClient").WithOAuth(settings);
    }

About

A HttpClient DelegatingHandler that handles OAuth handschake

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages