Class RequireCephalonAuthorizationAttribute
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Identity.AspNetCore.Transports.Rest
Assembly: Cephalon.Identity.AspNetCore.dll
Requires a Cephalon authorization decision before an ASP.NET Core controller or action can execute.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true, Inherited = true)]public sealed class RequireCephalonAuthorizationAttribute : Attribute, IFilterFactory, IOrderedFilter, IFilterMetadataInheritance
Section titled “Inheritance”object ← Attribute ← RequireCephalonAuthorizationAttribute
Implements
Section titled “Implements”IFilterFactory, IOrderedFilter, IFilterMetadata
Inherited Members
Section titled “Inherited Members”Attribute.Equals(object?), Attribute.GetCustomAttribute(Assembly, Type), Attribute.GetCustomAttribute(Assembly, Type, bool), Attribute.GetCustomAttribute(MemberInfo, Type), Attribute.GetCustomAttribute(MemberInfo, Type, bool), Attribute.GetCustomAttribute(Module, Type), Attribute.GetCustomAttribute(Module, Type, bool), Attribute.GetCustomAttribute(ParameterInfo, Type), Attribute.GetCustomAttribute(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(Assembly), Attribute.GetCustomAttributes(Assembly, bool), Attribute.GetCustomAttributes(Assembly, Type), Attribute.GetCustomAttributes(Assembly, Type, bool), Attribute.GetCustomAttributes(MemberInfo), Attribute.GetCustomAttributes(MemberInfo, bool), Attribute.GetCustomAttributes(MemberInfo, Type), Attribute.GetCustomAttributes(MemberInfo, Type, bool), Attribute.GetCustomAttributes(Module), Attribute.GetCustomAttributes(Module, bool), Attribute.GetCustomAttributes(Module, Type), Attribute.GetCustomAttributes(Module, Type, bool), Attribute.GetCustomAttributes(ParameterInfo), Attribute.GetCustomAttributes(ParameterInfo, bool), Attribute.GetCustomAttributes(ParameterInfo, Type), Attribute.GetCustomAttributes(ParameterInfo, Type, bool), Attribute.GetHashCode(), Attribute.IsDefaultAttribute(), Attribute.IsDefined(Assembly, Type), Attribute.IsDefined(Assembly, Type, bool), Attribute.IsDefined(MemberInfo, Type), Attribute.IsDefined(MemberInfo, Type, bool), Attribute.IsDefined(Module, Type), Attribute.IsDefined(Module, Type, bool), Attribute.IsDefined(ParameterInfo, Type), Attribute.IsDefined(ParameterInfo, Type, bool), Attribute.Match(object?), Attribute.TypeId, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Section titled “Remarks”This keeps controller and action authorization low ceremony by reusing the same Cephalon request-shaping, challenge, forbid, and problem-details behavior already used by the minimal-API helper surface.
Constructors
Section titled “Constructors”RequireCephalonAuthorizationAttribute(string)
Section titled “ RequireCephalonAuthorizationAttribute(string)”Requires a Cephalon authorization decision before an ASP.NET Core controller or action can execute.
public RequireCephalonAuthorizationAttribute(string policyId)Parameters
Section titled “Parameters”policyId string
Remarks
Section titled “Remarks”This keeps controller and action authorization low ceremony by reusing the same Cephalon request-shaping, challenge, forbid, and problem-details behavior already used by the minimal-API helper surface.
Properties
Section titled “Properties”Action
Section titled “ Action”Gets or sets the optional action to evaluate.
public string? Action { get; set; }Property Value
Section titled “Property Value”IsReusable
Section titled “ IsReusable”Gets a value indicating whether the MVC filter instance can be reused across requests.
public bool IsReusable { get; }Property Value
Section titled “Property Value”Gets the MVC filter order used to run the Cephalon authorization boundary early in the authorization stage.
public int Order { get; }Property Value
Section titled “Property Value”OwnerSubjectIdRouteKey
Section titled “ OwnerSubjectIdRouteKey”Gets or sets the optional route-value key that provides the owning subject identifier.
public string? OwnerSubjectIdRouteKey { get; set; }Property Value
Section titled “Property Value”PolicyId
Section titled “ PolicyId”Gets the Cephalon authorization policy id that must allow the request.
public string PolicyId { get; }Property Value
Section titled “Property Value”ResourceIdRouteKey
Section titled “ ResourceIdRouteKey”Gets or sets the optional route-value key that provides the resource identifier.
public string? ResourceIdRouteKey { get; set; }Property Value
Section titled “Property Value”ResourceType
Section titled “ ResourceType”Gets or sets the optional logical resource type.
public string? ResourceType { get; set; }Property Value
Section titled “Property Value”TenantRouteKey
Section titled “ TenantRouteKey”Gets or sets the optional route-value key that provides the tenant identifier.
public string? TenantRouteKey { get; set; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”CreateInstance(IServiceProvider)
Section titled “ CreateInstance(IServiceProvider)”Creates the MVC authorization filter that evaluates the current request through the shared Cephalon boundary executor.
public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)Parameters
Section titled “Parameters”serviceProvider IServiceProvider
The request-scoped service provider used to resolve executor services.
Returns
Section titled “Returns”The filter instance that will enforce the declared Cephalon authorization metadata.