Class AuthorizationDecision
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Abstractions.Authorization
Assembly: Cephalon.Abstractions.dll
Describes the outcome of one authorization evaluation.
public sealed class AuthorizationDecisionInheritance
Section titled “Inheritance”object ← AuthorizationDecision
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”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)Parameters
Section titled “Parameters”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.
Properties
Section titled “Properties”IsAllowed
Section titled “ IsAllowed”Gets a value indicating whether access was allowed.
public bool IsAllowed { get; }Property Value
Section titled “Property Value”Metadata
Section titled “ Metadata”Gets optional decision metadata.
public IReadOnlyDictionary<string, string> Metadata { get; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, string>
Gets the authorization modes that participated in the decision.
public IReadOnlyList<AuthorizationMode> Modes { get; }Property Value
Section titled “Property Value”IReadOnlyList<AuthorizationMode>
PolicyId
Section titled “ PolicyId”Gets the policy identifier that produced the decision when one is known.
public string? PolicyId { get; }Property Value
Section titled “Property Value”Reason
Section titled “ Reason”Gets the human-readable reason associated with the decision.
public string? Reason { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”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)Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”A denied authorization decision.