.NET API
RunAuthorizationResult
Tracon.Abstractions.dllThe outcome of an authorization decision.
public sealed record RunAuthorizationResult : IEquatable<RunAuthorizationResult>Inheritance
Section titled “Inheritance”object ← RunAuthorizationResult
Implements
Section titled “Implements”IEquatable<RunAuthorizationResult>
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”RunAuthorizationResult()
Section titled “ RunAuthorizationResult()”public RunAuthorizationResult()Properties
Section titled “Properties”IsAllowed
Section titled “ IsAllowed”Gets whether the call may proceed.
public required bool IsAllowed { get; init; }Property Value
Section titled “Property Value”Reason
Section titled “ Reason”Gets the text returned to the caller as the denial reason. null when allowed.
public string? Reason { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This text reaches the HTTP response’s ProblemDetails.Detail field, so it carries no secret.
Methods
Section titled “Methods”Allow()
Section titled “ Allow()”Creates an allowing result.
public static RunAuthorizationResult Allow()Returns
Section titled “Returns”A result with RunAuthorizationResult.IsAllowed set to true.
Deny(string)
Section titled “ Deny(string)”Creates a denying result.
public static RunAuthorizationResult Deny(string reason)Parameters
Section titled “Parameters”reason string
The text returned to the caller as the denial reason.
Returns
Section titled “Returns”A result with RunAuthorizationResult.IsAllowed set to false.
Exceptions
Section titled “Exceptions”reason is empty or whitespace.
Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(RunAuthorizationResult?)
Section titled “ Equals(RunAuthorizationResult?)”public bool Equals(RunAuthorizationResult? other)Parameters
Section titled “Parameters”other RunAuthorizationResult?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(RunAuthorizationResult?, RunAuthorizationResult?)
Section titled “ operator ==(RunAuthorizationResult?, RunAuthorizationResult?)”public static bool operator ==(RunAuthorizationResult? left, RunAuthorizationResult? right)Parameters
Section titled “Parameters”left RunAuthorizationResult?
right RunAuthorizationResult?
Returns
Section titled “Returns”operator !=(RunAuthorizationResult?, RunAuthorizationResult?)
Section titled “ operator !=(RunAuthorizationResult?, RunAuthorizationResult?)”public static bool operator !=(RunAuthorizationResult? left, RunAuthorizationResult? right)Parameters
Section titled “Parameters”left RunAuthorizationResult?
right RunAuthorizationResult?