Table of Contents

Class AuthenticationRotationResult

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

Represents the result of an authentication credential rotation operation.

public sealed class AuthenticationRotationResult
Inheritance
AuthenticationRotationResult
Inherited Members

Remarks

Initializes a new instance of the AuthenticationRotationResult class.

Constructors

AuthenticationRotationResult(bool, string?, DateTimeOffset?, DateTimeOffset?)

Represents the result of an authentication credential rotation operation.

public AuthenticationRotationResult(bool success, string? message = null, DateTimeOffset? rotatedAt = null, DateTimeOffset? nextRotationDue = null)

Parameters

success bool

Whether the rotation operation was successful.

message string

Optional message providing details about the rotation result.

rotatedAt DateTimeOffset?

The timestamp when the rotation occurred.

nextRotationDue DateTimeOffset?

The timestamp when the next rotation should occur.

Remarks

Initializes a new instance of the AuthenticationRotationResult class.

Properties

Message

Gets an optional message providing details about the rotation operation.

public string? Message { get; }

Property Value

string

A descriptive message about the rotation result, or null if not provided.

NextRotationDue

Gets the timestamp when the next rotation should occur.

public DateTimeOffset? NextRotationDue { get; }

Property Value

DateTimeOffset?

The UTC timestamp for the next scheduled rotation, or null if not applicable.

RotatedAt

Gets the timestamp when the rotation occurred.

public DateTimeOffset RotatedAt { get; }

Property Value

DateTimeOffset

The UTC timestamp of the credential rotation operation.

Success

Gets a value indicating whether the rotation was successful.

public bool Success { get; }

Property Value

bool

True if the credential rotation completed successfully, false otherwise.

Methods

CreateSuccess(string?, DateTimeOffset?)

Creates a successful rotation result.

public static AuthenticationRotationResult CreateSuccess(string? message = null, DateTimeOffset? nextRotationDue = null)

Parameters

message string

Optional success message.

nextRotationDue DateTimeOffset?

Optional timestamp for next rotation.

Returns

AuthenticationRotationResult

A new instance representing a successful rotation.

Failure(string)

Creates a failed rotation result.

public static AuthenticationRotationResult Failure(string message)

Parameters

message string

Error message describing the failure.

Returns

AuthenticationRotationResult

A new instance representing a failed rotation.