Table of Contents

Class AuthenticationEvent

Namespace
Excalibur.Data.ElasticSearch.Security
Assembly
Excalibur.Data.ElasticSearch.dll

Represents an authentication event for security auditing purposes.

public sealed class AuthenticationEvent
Inheritance
AuthenticationEvent
Inherited Members

Remarks

Initializes a new instance of the AuthenticationEvent class.

Constructors

AuthenticationEvent(string, DateTimeOffset, string, string, AuthenticationResult)

Represents an authentication event for security auditing purposes.

public AuthenticationEvent(string eventId, DateTimeOffset timestamp, string userId, string authenticationMethod, AuthenticationResult result)

Parameters

eventId string

The unique identifier for this authentication event.

timestamp DateTimeOffset

The timestamp when the authentication event occurred.

userId string

The identifier of the user attempting authentication.

authenticationMethod string

The method used for authentication.

result AuthenticationResult

The result of the authentication attempt.

Remarks

Initializes a new instance of the AuthenticationEvent class.

Properties

AuthenticationMethod

Gets the method used for authentication.

public string AuthenticationMethod { get; }

Property Value

string

The method used for authentication.

Context

Gets additional context information about the authentication event.

public IReadOnlyDictionary<string, object>? Context { get; init; }

Property Value

IReadOnlyDictionary<string, object>

Additional context information about the authentication event.

EventId

Gets the unique identifier for this authentication event.

public string EventId { get; }

Property Value

string

The unique identifier for this authentication event.

FailureReason

Gets the reason for authentication failure, if applicable.

public string? FailureReason { get; init; }

Property Value

string

The reason for authentication failure, if applicable.

Id

Gets the unique identifier for this authentication event (alias for EventId).

public string Id { get; }

Property Value

string

The unique identifier for this authentication event.

IpAddress

Gets the IP address from which the authentication attempt originated.

public string? IpAddress { get; init; }

Property Value

string

The IP address from which the authentication attempt originated.

Location

Gets the location from which the authentication attempt originated.

public string? Location { get; init; }

Property Value

string

The location from which the authentication attempt originated.

Result

Gets the result of the authentication attempt.

public AuthenticationResult Result { get; }

Property Value

AuthenticationResult

The result of the authentication attempt.

SessionId

Gets the session identifier associated with the authentication.

public string? SessionId { get; init; }

Property Value

string

The session identifier associated with the authentication.

Success

Gets a value indicating whether the authentication was successful.

public bool Success { get; }

Property Value

bool

true if the authentication was successful; otherwise, false.

Timestamp

Gets the timestamp when the authentication event occurred.

public DateTimeOffset Timestamp { get; }

Property Value

DateTimeOffset

The timestamp when the authentication event occurred.

UserAgent

Gets the user agent string from the authentication request.

public string? UserAgent { get; init; }

Property Value

string

The user agent string from the authentication request.

UserId

Gets the identifier of the user attempting authentication.

public string UserId { get; }

Property Value

string

The identifier of the user attempting authentication.