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
optionsIOptions<IdentityServerOptions>The server options; their
Eventssection decides which kinds of event are raised.sinkIEventSinkWhere raised events are written.
timeTimeProviderThe clock that stamps each event.
httpContextAccessorIHttpContextAccessorReaches 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
evtEventThe event about to be written.