Table of Contents

Class ApiResource

Namespace
Duende.IdentityServer.Models
Assembly
Duende.IdentityServer.Storage.dll

Models a web API resource.

public class ApiResource : Resource
Inheritance
ApiResource
Inherited Members

Constructors

ApiResource()

Initializes a new instance of the ApiResource class.

public ApiResource()

ApiResource(string)

Initializes a new instance of the ApiResource class.

public ApiResource(string name)

Parameters

name string

The name.

ApiResource(string, IEnumerable<string>)

Initializes a new instance of the ApiResource class.

public ApiResource(string name, IEnumerable<string> userClaims)

Parameters

name string

The name.

userClaims IEnumerable<string>

List of associated user claims that should be included when this resource is requested.

ApiResource(string, string)

Initializes a new instance of the ApiResource class.

public ApiResource(string name, string displayName)

Parameters

name string

The name.

displayName string

The display name.

ApiResource(string, string?, IEnumerable<string>?)

Initializes a new instance of the ApiResource class.

public ApiResource(string name, string? displayName, IEnumerable<string>? userClaims)

Parameters

name string

The name.

displayName string

The display name.

userClaims IEnumerable<string>

List of associated user claims that should be included when this resource is requested.

Exceptions

ArgumentNullException

name

Properties

AllowedAccessTokenSigningAlgorithms

Signing algorithm for access token. If empty, will use the server default signing algorithm.

public ICollection<string> AllowedAccessTokenSigningAlgorithms { get; set; }

Property Value

ICollection<string>

ApiSecrets

The API secret is used for the introspection endpoint. The API can authenticate with introspection using the API name and secret.

public ICollection<Secret> ApiSecrets { get; set; }

Property Value

ICollection<Secret>

RequireResourceIndicator

Indicates if this API resource requires the resource indicator to request it, and expects access tokens issued to it will only ever contain this API resource as the audience.

public bool RequireResourceIndicator { get; set; }

Property Value

bool

Scopes

Models the scopes this API resource allows.

public ICollection<string> Scopes { get; set; }

Property Value

ICollection<string>