Table of Contents

Class Event

Namespace
Duende.IdentityServer.Events
Assembly
Duende.IdentityServer.dll

Models base class for events raised from IdentityServer.

public abstract class Event
Inheritance
Event
Derived
Inherited Members

Constructors

Event(string, string, EventTypes, int, string?)

Initializes a new instance of the Event class.

protected Event(string category, string name, EventTypes type, int id, string? message = null)

Parameters

category string

The category.

name string

The name.

type EventTypes

The type.

id int

The identifier.

message string

The message.

Exceptions

ArgumentNullException

category

Properties

ActivityId

Gets or sets the per-request trace identifier (not the Activity Id)

public string? ActivityId { get; set; }

Property Value

string

The HttpContext.TraceIdentifier.

Remarks

Note that this is not the Activity Id despite the name.

Category

Gets or sets the category.

public string Category { get; set; }

Property Value

string

The category.

EventType

Gets or sets the event type.

public EventTypes EventType { get; set; }

Property Value

EventTypes

The type of the event.

Id

Gets or sets the identifier.

public int Id { get; set; }

Property Value

int

The identifier.

LocalIpAddress

Gets or sets the local ip address of the current request.

public string? LocalIpAddress { get; set; }

Property Value

string

The local ip address.

Message

Gets or sets the event message.

public string? Message { get; set; }

Property Value

string

The message.

Name

Gets or sets the name.

public string Name { get; set; }

Property Value

string

The name.

ProcessId

Gets or sets the server process identifier.

public int ProcessId { get; set; }

Property Value

int

The process identifier.

RemoteIpAddress

Gets or sets the remote ip address of the current request.

public string? RemoteIpAddress { get; set; }

Property Value

string

The remote ip address.

TimeStamp

Gets or sets the time stamp when the event was raised.

public DateTime TimeStamp { get; set; }

Property Value

DateTime

The time stamp.

Methods

Obfuscate(string)

Obfuscates a token.

protected static string Obfuscate(string value)

Parameters

value string

The token.

Returns

string

PrepareAsync()

Allows implementing custom initialization logic.

protected virtual Task PrepareAsync()

Returns

Task

ToString()

public override string ToString()

Returns

string