ข้ามไปยังเนื้อหา

Class AuthorizationDecision

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Abstractions.Authorization
Assembly: Cephalon.Abstractions.dll

Describes the outcome of one authorization evaluation.

public sealed class AuthorizationDecision

objectAuthorizationDecision

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

AuthorizationDecision(bool, string?, string?, IReadOnlyList<AuthorizationMode>?, IReadOnlyDictionary<string, string>?)

Section titled “ AuthorizationDecision(bool, string?, string?, IReadOnlyList<AuthorizationMode>?, IReadOnlyDictionary<string, string>?)”

Creates a new authorization decision.

public AuthorizationDecision(bool isAllowed, string? policyId = null, string? reason = null, IReadOnlyList<AuthorizationMode>? modes = null, IReadOnlyDictionary<string, string>? metadata = null)

isAllowed bool

Whether access was allowed.

policyId string?

The policy identifier that produced the decision when one is known.

reason string?

The human-readable reason associated with the decision.

modes IReadOnlyList<AuthorizationMode>?

The authorization modes that participated in the decision.

metadata IReadOnlyDictionary<string, string>?

Optional decision metadata.

Gets a value indicating whether access was allowed.

public bool IsAllowed { get; }

bool

Gets optional decision metadata.

public IReadOnlyDictionary<string, string> Metadata { get; }

IReadOnlyDictionary<string, string>

Gets the authorization modes that participated in the decision.

public IReadOnlyList<AuthorizationMode> Modes { get; }

IReadOnlyList<AuthorizationMode>

Gets the policy identifier that produced the decision when one is known.

public string? PolicyId { get; }

string?

Gets the human-readable reason associated with the decision.

public string? Reason { get; }

string?

Allow(string?, string?, IReadOnlyList<AuthorizationMode>?, IReadOnlyDictionary<string, string>?)

Section titled “ Allow(string?, string?, IReadOnlyList<AuthorizationMode>?, IReadOnlyDictionary<string, string>?)”

Creates an allowed authorization decision.

public static AuthorizationDecision Allow(string? policyId = null, string? reason = null, IReadOnlyList<AuthorizationMode>? modes = null, IReadOnlyDictionary<string, string>? metadata = null)

policyId string?

The policy identifier that produced the decision when one is known.

reason string?

The human-readable reason associated with the decision.

modes IReadOnlyList<AuthorizationMode>?

The authorization modes that participated in the decision.

metadata IReadOnlyDictionary<string, string>?

Optional decision metadata.

AuthorizationDecision

An allowed authorization decision.

Deny(string?, string?, IReadOnlyList<AuthorizationMode>?, IReadOnlyDictionary<string, string>?)

Section titled “ Deny(string?, string?, IReadOnlyList<AuthorizationMode>?, IReadOnlyDictionary<string, string>?)”

Creates a denied authorization decision.

public static AuthorizationDecision Deny(string? policyId = null, string? reason = null, IReadOnlyList<AuthorizationMode>? modes = null, IReadOnlyDictionary<string, string>? metadata = null)

policyId string?

The policy identifier that produced the decision when one is known.

reason string?

The human-readable reason associated with the decision.

modes IReadOnlyList<AuthorizationMode>?

The authorization modes that participated in the decision.

metadata IReadOnlyDictionary<string, string>?

Optional decision metadata.

AuthorizationDecision

A denied authorization decision.