Table of Contents

Class AuthorizationResult

Namespace
Excalibur.Dispatch.Middleware.Auth
Assembly
Excalibur.Dispatch.dll

Result of authorization evaluation.

public sealed class AuthorizationResult
Inheritance
AuthorizationResult
Inherited Members
Extension Methods

Properties

IsAuthorized

Gets a value indicating whether authorization succeeded.

public bool IsAuthorized { get; }

Property Value

bool

The current IsAuthorized value.

Reason

Gets the reason for authorization failure, if applicable.

public string? Reason { get; }

Property Value

string

The current Reason value.

Methods

Failure(string)

Creates a failed authorization result with a reason.

public static AuthorizationResult Failure(string reason)

Parameters

reason string

Returns

AuthorizationResult

Success()

Creates a successful authorization result.

public static AuthorizationResult Success()

Returns

AuthorizationResult