Definition
Assembly: Microsoft.OData.Mcp.AspNetCore.dll Namespace: Microsoft.OData.Mcp.AspNetCore.HealthChecks Inheritance: System.ObjectSyntax
Summary
Health check for the authentication system.Remarks
This health check verifies that the authentication components are functioning correctly, including token validation services, authority connectivity, and configuration validity.Constructors
.ctor
Initializes a new instance of the AuthenticationHealthCheck class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
authOptions | Microsoft.Extensions.Options.IOptions<Microsoft.OData.Mcp.Authentication.Models.McpAuthenticationOptions> | The authentication options. |
logger | Microsoft.Extensions.Logging.ILogger<Microsoft.OData.Mcp.AspNetCore.HealthChecks.AuthenticationHealthCheck> | The logger instance. |
tokenValidationService | Microsoft.OData.Mcp.Authentication.Services.ITokenValidationService? | The token validation service (optional). |
httpClientFactory | System.Net.Http.IHttpClientFactory? | The HTTP client factory (optional). |
Exceptions
| Exception | Description |
|---|---|
ArgumentNullException | Thrown when authOptions or logger is null. |
.ctor Inherited
Inherited from
objectSyntax
Methods
CheckHealthAsync
Checks the health of the authentication system.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
context | Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext | The health check context. |
cancellationToken | System.Threading.CancellationToken | A cancellation token to cancel the operation. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult>
A task that represents the asynchronous health check operation.
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Related APIs
- Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck