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

Class IdentityEndpointConventionBuilderExtensions

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

Namespace: Cephalon.Identity.AspNetCore.Transports.Rest
Assembly: Cephalon.Identity.AspNetCore.dll

Adds Cephalon-specific authorization conventions to REST route handlers and groups.

public static class IdentityEndpointConventionBuilderExtensions

objectIdentityEndpointConventionBuilderExtensions

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

RequireCephalonAuthorization(RouteHandlerBuilder, string, string?, string?, string?, string?, string?)

Section titled “ RequireCephalonAuthorization(RouteHandlerBuilder, string, string?, string?, string?, string?, string?)”

Requires a Cephalon authorization decision before a REST route handler can execute.

public static RouteHandlerBuilder RequireCephalonAuthorization(this RouteHandlerBuilder builder, string policyId, string? action = null, string? resourceType = null, string? resourceIdRouteKey = null, string? tenantRouteKey = null, string? ownerSubjectIdRouteKey = null)

builder RouteHandlerBuilder

The route handler builder to protect.

policyId string

The Cephalon authorization policy id that must allow the request.

action string?

The optional action to evaluate. When omitted, the adapter maps the HTTP method to a conventional action such as read, create, update, or delete.

resourceType string?

The optional logical resource type. When omitted, the adapter derives it from the final literal segment in the endpoint route pattern.

resourceIdRouteKey string?

The optional route-value key that provides the resource identifier. When omitted, the adapter falls back to the configured resource-id route keys.

tenantRouteKey string?

The optional route-value key that provides the tenant identifier. When omitted, the adapter falls back to the configured tenant route keys and tenant headers.

ownerSubjectIdRouteKey string?

The optional route-value key that provides the owning subject identifier for owner-based policies.

RouteHandlerBuilder

The same route handler builder for fluent convention chaining.

This helper keeps ASP.NET Core principal and route parsing in the host layer while still evaluating the shared Cephalon authorization contracts through .

RequireCephalonAuthorization(RouteGroupBuilder, string, string?, string?, string?, string?, string?)

Section titled “ RequireCephalonAuthorization(RouteGroupBuilder, string, string?, string?, string?, string?, string?)”

Requires a Cephalon authorization decision before every REST route handler in the route group can execute.

public static RouteGroupBuilder RequireCephalonAuthorization(this RouteGroupBuilder builder, string policyId, string? action = null, string? resourceType = null, string? resourceIdRouteKey = null, string? tenantRouteKey = null, string? ownerSubjectIdRouteKey = null)

builder RouteGroupBuilder

The route group builder to protect.

policyId string

The Cephalon authorization policy id that must allow the request.

action string?

The optional action to evaluate. When omitted, the adapter maps the HTTP method to a conventional action such as read, create, update, or delete.

resourceType string?

The optional logical resource type. When omitted, the adapter derives it from the final literal segment in the endpoint route pattern.

resourceIdRouteKey string?

The optional route-value key that provides the resource identifier. When omitted, the adapter falls back to the configured resource-id route keys.

tenantRouteKey string?

The optional route-value key that provides the tenant identifier. When omitted, the adapter falls back to the configured tenant route keys and tenant headers.

ownerSubjectIdRouteKey string?

The optional route-value key that provides the owning subject identifier for owner-based policies.

RouteGroupBuilder

The same route group builder for fluent convention chaining.

WithCephalonAuthenticationSchemes<TBuilder>(TBuilder, params string[])

Section titled “ WithCephalonAuthenticationSchemes<TBuilder>(TBuilder, params string[])”

Declares the ASP.NET Core authentication schemes that should own challenge and forbid responses for an endpoint or route group.

public static TBuilder WithCephalonAuthenticationSchemes<TBuilder>(this TBuilder builder, params string[] authenticationSchemes) where TBuilder : IEndpointConventionBuilder

builder TBuilder

The endpoint or route-group builder to annotate.

authenticationSchemes string[]

The authentication scheme names to use for boundary responses.

TBuilder

The same builder for fluent chaining.

TBuilder

The endpoint convention builder type.