Namespace Arc4u.OAuth2.TokenProvider
Classes
- BlazorMsalTokenProvider
Provides an implementation of ITokenProvider for Blazor applications using MSAL.
- BlazorTokenProvider
Provides an implementation of ITokenProvider for Blazor applications.
- ClientCredentialsTokenProvider
grant_type=client_credentialstoken provider authenticating the client with theclient_secret_basicmethod: theClientId/ClientSecretpair is sent in the HTTPAuthorization: Basic base64(client_id:client_secret)header, while the scope and any extra parameter (e.g.resource) travel in the form body.It consumes the settings produced by ClientCredentialsScenario and caches the acquired application token by client + scope + authority, refreshing it close to expiry.
- ClientTokenProvider
An ITokenProvider for a Blazor WebAssembly application whose token is given by its server backend. The token is requested with a GET on the
TokenRequestUrlof the settings, through the HttpClient named byHttpClientName(seeAddAuthenticationCookie), and kept until it expires.
- CredentialTokenCacheTokenProvider
An ITokenProvider for user name and password credentials. The token is cached (key: authority, scope, user and a hash of the password) and requested again through the ICredentialTokenProvider registered as
CredentialDirectwhen it is missing or expires in less than one minute.
- CredentialTokenProvider
An ICredentialTokenProvider that requests a token from the token endpoint of an authority with the OAuth2 resource owner password grant. The provider is registered under the name ProviderName. The authority is read from the
Authoritykey of the settings (or theDefaultauthority), theClientId, optionalClientSecretandScope(defaultopenid) keys come from the settings too. Failing requests are retried during RetryInterval (90 seconds by default).
- RemoteClientSecretTokenProvider
An ITokenProvider that does not call an authority: it wraps the remote secret of the settings (ClientSecret) in a TokenInfo valid for one hour, using the header name of the settings (ClientSecretHeader) as token type. When the header is
Basic, a clearuser:passwordsecret is Base64 encoded; a secret already Base64 encoded is sent as is.
- TokenJsonContext
The source generated JSON serialization context used to read the token returned by the server.