Class OpenIddictValidationService
Inheritance
Inherited Members
Namespace: OpenIddict.Validation
Assembly: cs.temp.dll.dll
Syntax
public class OpenIddictValidationService
Constructors
OpenIddictValidationService(IServiceProvider)
Creates a new instance of the OpenIddictValidationService class.
Declaration
public OpenIddictValidationService(IServiceProvider provider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | provider | The service provider. |
Methods
GetConfigurationAsync(Uri, CancellationToken)
Retrieves the OpenID Connect server configuration from the specified address.
Declaration
public ValueTask<OpenIdConnectConfiguration> GetConfigurationAsync(Uri address, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | address | The address of the remote metadata endpoint. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask<OpenIdConnectConfiguration> | The OpenID Connect server configuration retrieved from the remote server. |
GetSecurityKeysAsync(Uri, CancellationToken)
Retrieves the security keys exposed by the specified JWKS endpoint.
Declaration
public ValueTask<JsonWebKeySet> GetSecurityKeysAsync(Uri address, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | address | The address of the remote metadata endpoint. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask<JsonWebKeySet> | The security keys retrieved from the remote server. |
IntrospectTokenAsync(Uri, String, CancellationToken)
Sends an introspection request to the specified address and returns the corresponding principal.
Declaration
public ValueTask<ClaimsPrincipal> IntrospectTokenAsync(Uri address, string token, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | address | The address of the remote metadata endpoint. |
System.String | token | The token to introspect. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask<ClaimsPrincipal> | The claims principal created from the claim retrieved from the remote server. |
IntrospectTokenAsync(Uri, String, String, CancellationToken)
Sends an introspection request to the specified address and returns the corresponding principal.
Declaration
public ValueTask<ClaimsPrincipal> IntrospectTokenAsync(Uri address, string token, string type, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | address | The address of the remote metadata endpoint. |
System.String | token | The token to introspect. |
System.String | type | The token type to introspect. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask<ClaimsPrincipal> | The claims principal created from the claim retrieved from the remote server. |
ValidateAccessTokenAsync(String, CancellationToken)
Validates the specified access token and returns the principal extracted from the token.
Declaration
public ValueTask<ClaimsPrincipal> ValidateAccessTokenAsync(string token, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | The access token to validate. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask<ClaimsPrincipal> | The principal containing the claims extracted from the token. |