Scalepoint.OAuth.TokenClient 0.9.0-alpha1

Client helper for OAuth2 2-legged flows with client secret and JWT client assertion support and token caching

This is a prerelease version of Scalepoint.OAuth.TokenClient.
Install-Package Scalepoint.OAuth.TokenClient -Version 0.9.0-alpha1
dotnet add package Scalepoint.OAuth.TokenClient --version 0.9.0-alpha1
<PackageReference Include="Scalepoint.OAuth.TokenClient" Version="0.9.0-alpha1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Scalepoint.OAuth.TokenClient --version 0.9.0-alpha1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

OAuth Token Endpoint Client for .NET

Description

Client helper for OAuth2 Token endpoint. Supports "Client Credentials" flow with "client_secret", RS256 JWT "client_assertion", custom grants and token caching.

Features

If you need support for other grant types or authentication methods, please check IdentityModel2.

Getting started

Install from NuGet:

Install-Package Scalepoint.OAuth.TokenClient

Obtaining access token from Authorization Server token endpoint is as simple as this:

private_key_jwt
var tokenClient = new ClientCredentialsGrantTokenClient(
                        tokenEndpointUrl,
                        new JwtBearerClientAssertionCredentials(
                            tokenEndpointUrl,
                            clientId,
                            x509certificate
                        )
                  );

var accessToken = await tokenClient.GetTokenAsync(new [] { scope1, scope2 });
client_secret
var tokenClient = new ClientCredentialsGrantTokenClient(
                        tokenEndpointUrl,
                        new ClientSecretCredentials(
                            clientId,
                            clientSecret
                        )
                  );

var accessToken = await tokenClient.GetTokenAsync(new [] { scope1, scope2 });

OAuth Token Endpoint Client for .NET

Description

Client helper for OAuth2 Token endpoint. Supports "Client Credentials" flow with "client_secret", RS256 JWT "client_assertion", custom grants and token caching.

Features

If you need support for other grant types or authentication methods, please check IdentityModel2.

Getting started

Install from NuGet:

Install-Package Scalepoint.OAuth.TokenClient

Obtaining access token from Authorization Server token endpoint is as simple as this:

private_key_jwt
var tokenClient = new ClientCredentialsGrantTokenClient(
                        tokenEndpointUrl,
                        new JwtBearerClientAssertionCredentials(
                            tokenEndpointUrl,
                            clientId,
                            x509certificate
                        )
                  );

var accessToken = await tokenClient.GetTokenAsync(new [] { scope1, scope2 });
client_secret
var tokenClient = new ClientCredentialsGrantTokenClient(
                        tokenEndpointUrl,
                        new ClientSecretCredentials(
                            clientId,
                            clientSecret
                        )
                  );

var accessToken = await tokenClient.GetTokenAsync(new [] { scope1, scope2 });

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.9.0-alpha1 807 10/19/2018
0.8.0 1,428 12/5/2017
0.7.1 239 12/1/2017
0.7.0 228 12/1/2017