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

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, IFilterMetadata

objectAttributeRequireCephalonAuthorizationAttribute

IFilterFactory, IOrderedFilter, IFilterMetadata

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()

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.

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)

policyId string

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.

Gets or sets the optional action to evaluate.

public string? Action { get; set; }

string?

Gets a value indicating whether the MVC filter instance can be reused across requests.

public bool IsReusable { get; }

bool

Gets the MVC filter order used to run the Cephalon authorization boundary early in the authorization stage.

public int Order { get; }

int

Gets or sets the optional route-value key that provides the owning subject identifier.

public string? OwnerSubjectIdRouteKey { get; set; }

string?

Gets the Cephalon authorization policy id that must allow the request.

public string PolicyId { get; }

string

Gets or sets the optional route-value key that provides the resource identifier.

public string? ResourceIdRouteKey { get; set; }

string?

Gets or sets the optional logical resource type.

public string? ResourceType { get; set; }

string?

Gets or sets the optional route-value key that provides the tenant identifier.

public string? TenantRouteKey { get; set; }

string?

Creates the MVC authorization filter that evaluates the current request through the shared Cephalon boundary executor.

public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)

serviceProvider IServiceProvider

The request-scoped service provider used to resolve executor services.

IFilterMetadata

The filter instance that will enforce the declared Cephalon authorization metadata.