Class ClientAuthenticator
Authenticate the OpenID client.
Implements
Inherited Members
Namespace: ComponentSpace.OpenID.Security
Assembly: ComponentSpace.OpenID.dll
Syntax
public class ClientAuthenticator : IClientAuthenticator
Constructors
ClientAuthenticator(IConfigurationResolver, ICache, IClientSecretVerifier, ITokenSecurity, IHttpContextAccessor, ILoggerFactory)
Initializes a new instance of the ClientAuthenticator class.
Declaration
public ClientAuthenticator(IConfigurationResolver configurationResolver, ICache cache, IClientSecretVerifier clientSecretVerifier, ITokenSecurity tokenSecurity, IHttpContextAccessor httpContextAccessor, ILoggerFactory loggerFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IConfigurationResolver | configurationResolver | The configuration resolver. |
| ICache | cache | The cache. |
| IClientSecretVerifier | clientSecretVerifier | The client secret verifier. |
| ITokenSecurity | tokenSecurity | The token security. |
| IHttpContextAccessor | httpContextAccessor | The HTTP context accessor. |
| ILoggerFactory | loggerFactory | The logger factory. |
Methods
AuthenticateClientAsync(ProviderConfiguration, string?, string?, string?, string?, string?, string[]?)
Authenticates the client.
Declaration
public virtual Task<ClientAuthenticationResult> AuthenticateClientAsync(ProviderConfiguration providerConfiguration, string? clientID, string? clientSecret, string? clientAssertionType, string? clientAssertion, string? validAudience, string[]? authSigningAlgValuesSupported)
Parameters
| Type | Name | Description |
|---|---|---|
| ProviderConfiguration | providerConfiguration | The provider configuration. |
| string | clientID | The client ID. |
| string | clientSecret | The client secret. |
| string | clientAssertionType | The client assertion type. |
| string | clientAssertion | The client assertion. |
| string | validAudience | The valid audience URL. |
| string[] | authSigningAlgValuesSupported | The supported JWS signing algorithms (alg) used to authenticate the client. |
Returns
| Type | Description |
|---|---|
| Task<ClientAuthenticationResult> | A task that represents the operation and returns the client authentication result. |
Exceptions
| Type | Condition |
|---|---|
| OpenIDException | Thrown when the client cannot be authenticated. |