This package contains some oauth authenticators to use with the ClickView.Extensions.RestClient package.
Used to authenticate against an API with client credentials
| Option | Default | Description |
|---|---|---|
| Scopes | [] | List of scopes to authenticate with |
| ClientId | null | The client id |
| ClientSecret | null | The client secret |
| EnableDiscovery | true | If true, use OpenID Connect discovery to find the correct auth endpoints |
| TokenStore | InMemoryTokenStore | The TokenStore used to store the cached tokens |
| Endpoints | null | (Not implemented) |
var options = new RestClientOptions
{
Authenticator = new ClientCredentialsAuthenticator("https://oauth.example.com",
new ClientCredentialsAuthenticatorOptions
{
ClientId = "test_client",
ClientSecret = "test_sec_id",
Scopes = new[] {"read"}
})
};You can create your own OAuth authenticators by extending OAuthAuthenticator<TOptions>
You can create your own token stores by implementing ITokenStore