Skip to content

Latest commit

 

History

History
95 lines (79 loc) · 2.87 KB

File metadata and controls

95 lines (79 loc) · 2.87 KB

Atc.Rest


AtcRestAssemblyTypeInitializer

public static class AtcRestAssemblyTypeInitializer

IRequestContext

Provides access to HTTP request context information including identity and correlation identifiers.

Remarks: This interface is typically used in service layers to access request-scoped information without directly depending on Microsoft.AspNetCore.Http.HttpContext.

public interface IRequestContext

Properties

CallingIdentity

CallingIdentity

Summary: Gets the identity of the current caller from the authentication principal.

CorrelationId

CorrelationId

Summary: Gets the correlation ID that tracks a request across multiple services.

Remarks: The correlation ID is propagated across service boundaries to enable distributed tracing and tracking of a logical operation that spans multiple microservices.

OnBehalfOfIdentity

OnBehalfOfIdentity

Summary: Gets the identity of the original caller when the service is acting on behalf of another user or service.

Remarks: In service-to-service scenarios, this represents the end-user identity when a core service makes the request. If not acting on behalf of another identity, this returns the same value as Atc.Rest.IRequestContext.CallingIdentity.

RequestCancellationToken

RequestCancellationToken

Summary: Gets the cancellation token that is triggered when the HTTP request is aborted.

Remarks: This token should be passed to asynchronous operations to allow graceful cancellation when the client disconnects or the request times out.

RequestId

RequestId

Summary: Gets the unique request ID for the current HTTP request.

Remarks: This ID is used for tracking individual requests and correlating log entries.


RequestContext

Default implementation of Atc.Rest.IRequestContext that provides access to HTTP request context information.

Remarks: This class uses Microsoft.AspNetCore.Http.IHttpContextAccessor to access the current HTTP context and extract identity, correlation, and request identifiers. It is registered as a transient service when Atc.Rest.Options.RestApiOptions.UseHttpContextAccessor is enabled.

public class RequestContext : IRequestContext

Properties

CallingIdentity

CallingIdentity

CorrelationId

CorrelationId

OnBehalfOfIdentity

OnBehalfOfIdentity

RequestCancellationToken

RequestCancellationToken

RequestId

RequestId

Generated by MarkdownCodeDoc version 1.2