Table of Contents

Class HttpEventService

Namespace
Fdyay.IdentityServer.Services
Assembly
Fdyay.IdentityServer.AspNetCore.dll

Adds the request's identity and addresses to every event raised during one.

public class HttpEventService : DefaultEventService, IEventService
Inheritance
HttpEventService
Implements
Inherited Members

Remarks

The split exists because the core assembly has no notion of an HTTP request and should not gain one for this. Raising code stays ignorant of the context either way: a validator does not know whether a request is in flight, and events raised outside one — a background sweep, a test — simply carry less.

Constructors

HttpEventService(IOptions<IdentityServerOptions>, IEventSink, TimeProvider, IHttpContextAccessor)

Creates the service, as the container resolves it.

public HttpEventService(IOptions<IdentityServerOptions> options, IEventSink sink, TimeProvider time, IHttpContextAccessor httpContextAccessor)

Parameters

options IOptions<IdentityServerOptions>

The server options; their Events section decides which kinds of event are raised.

sink IEventSink

Where raised events are written.

time TimeProvider

The clock that stamps each event.

httpContextAccessor IHttpContextAccessor

Reaches the request in flight, whose identity and addresses each event is given.

Methods

Enrich(Event)

Sets the event's ActivityId to the request's trace identifier, and its remote and local IP addresses to the connection's; leaves an event raised outside a request as it is.

protected override void Enrich(Event evt)

Parameters

evt Event

The event about to be written.