Table of Contents

Class AuthorizationResult

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Represents the result of an authorization operation.

public sealed class AuthorizationResult : IAuthorizationResult
Inheritance
AuthorizationResult
Implements
Inherited Members
Extension Methods

Properties

FailureMessage

Gets the failure message when authorization fails.

public string? FailureMessage { get; init; }

Property Value

string

The optional reason describing the authorization failure.

IsAuthorized

Gets a value indicating whether the authorization was successful.

public bool IsAuthorized { get; init; }

Property Value

bool

true when the request is authorized; otherwise, false.

Methods

Failed(string)

Creates a failed authorization result with the specified message.

public static AuthorizationResult Failed(string message)

Parameters

message string

The failure message.

Returns

AuthorizationResult

An AuthorizationResult indicating failure.

Success()

Creates a successful authorization result.

public static AuthorizationResult Success()

Returns

AuthorizationResult

An AuthorizationResult indicating success.