#### [Abblix\.Oidc\.Server](https://www.abblix.com/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Common\.Constants](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants 'Abblix\.Oidc\.Server\.Common\.Constants')

## 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\.

```csharp
public record ResourceDefinition : System.IEquatable<Abblix.Oidc.Server.Common.Constants.ResourceDefinition>
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → ResourceDefinition

Implements [System\.IEquatable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')[ResourceDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ResourceDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ResourceDefinition')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')
### Constructors

## ResourceDefinition\(Uri, ScopeDefinition\[\]\) Constructor {#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.ResourceDefinition(System.Uri,Abblix.Oidc.Server.Common.Constants.ScopeDefinition[])}

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\.

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

###### `Resource` [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') {#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.ResourceDefinition(System.Uri,Abblix.Oidc.Server.Common.Constants.ScopeDefinition[]).Resource}

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

###### `Scopes` [ScopeDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ScopeDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array') {#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.ResourceDefinition(System.Uri,Abblix.Oidc.Server.Common.Constants.ScopeDefinition[]).Scopes}

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 {#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.Jwks}

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](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ResourceDefinition#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.JwksUri 'Abblix\.Oidc\.Server\.Common\.Constants\.ResourceDefinition\.JwksUri')\)\.

```csharp
public Abblix.Jwt.JsonWebKeySet? Jwks { get; init; }
```

#### Property Value
[JsonWebKeySet](https://www.abblix.com/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKeySet 'Abblix\.Jwt\.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 {#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.JwksUri}

The URL where this resource server publishes its JSON Web Key Set, per
[RFC 9728 Section 2](https://datatracker.ietf.org/doc/html/rfc9728#section-2 'https://datatracker.ietf.org/doc/html/rfc9728\#section-2')\. Fetched
with the same SSRF\-protected, cached path as a client's key set\.

```csharp
public System.Uri? JwksUri { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

### Remarks
May be combined with [Jwks](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ResourceDefinition#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.Jwks 'Abblix\.Oidc\.Server\.Common\.Constants\.ResourceDefinition\.Jwks'), in which case the inline keys are considered first, exactly as
for a client that registers both\.

## ResourceDefinition\.Resource Property {#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.Resource}

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

```csharp
public System.Uri Resource { get; init; }
```

#### Property Value
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')

## ResourceDefinition\.Scopes Property {#Abblix.Oidc.Server.Common.Constants.ResourceDefinition.Scopes}

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\.

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

#### Property Value
[ScopeDefinition](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ScopeDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')
