Zum Inhalt springen
Diese Seite wurde noch nicht übersetzt.

ResourceDefinition Class

Represents a resource with associated scopes, defining the permissions and access levels within an application. This record is typically used to configure and enforce authorization policies based on resource identifiers and their corresponding scopes.

C#
public record ResourceDefinition : System.IEquatable<Abblix.Oidc.Server.Common.Constants.ResourceDefinition>

Inheritance System.Object → ResourceDefinition

Implements System.IEquatable<ResourceDefinition>

Constructors

ResourceDefinition(Uri, ScopeDefinition[]) Constructor

Represents a resource with associated scopes, defining the permissions and access levels within an application. This record is typically used to configure and enforce authorization policies based on resource identifiers and their corresponding scopes.

C#
public ResourceDefinition(System.Uri Resource, params Abblix.Oidc.Server.Common.Constants.ScopeDefinition[] Scopes);

Parameters

Resource System.Uri

The identifier for the resource, often a unique name or URL representing the resource.

Scopes ScopeDefinition[]

A variable number of scope definitions associated with the resource. Each scope definition specifies a scope and its related claims, detailing the access levels and permissions granted.

Properties

ResourceDefinition.Jwks Property

The set of JSON Web Keys published by this resource server, used to encrypt an access token issued for it. Only public keys belong here: encryption uses the public half, and the resource keeps the private one (RFC 9728 Section 2 describes the same key set served over JwksUri).

C#
public Abblix.Jwt.JsonWebKeySet? Jwks { get; init; }

Property Value

JsonWebKeySet

Remarks

Declaring a key is what asks for the access token to be encrypted to this resource rather than left a signed JWS. The key-management algorithm is taken from the key's own alg (RFC 7517 Section 4.4), so there is no separate algorithm declaration to keep in step: a key that declares none matches whatever the server offers.

ResourceDefinition.JwksUri Property

The URL where this resource server publishes its JSON Web Key Set, per RFC 9728 Section 2. Fetched with the same SSRF-protected, cached path as a client's key set.

C#
public System.Uri? JwksUri { get; init; }

Property Value

System.Uri

Remarks

May be combined with Jwks, in which case the inline keys are considered first, exactly as for a client that registers both.

ResourceDefinition.Resource Property

The identifier for the resource, often a unique name or URL representing the resource.

C#
public System.Uri Resource { get; init; }

Property Value

System.Uri

ResourceDefinition.Scopes Property

A variable number of scope definitions associated with the resource. Each scope definition specifies a scope and its related claims, detailing the access levels and permissions granted.

C#
public Abblix.Oidc.Server.Common.Constants.ScopeDefinition[] Scopes { get; init; }

Property Value

ScopeDefinition[]