Table of Contents

Class IdentityResource

Namespace
Fdyay.IdentityServer.Models
Assembly
Fdyay.IdentityServer.Core.dll

Models an OpenID Connect identity resource (a set of identity claims).

public class IdentityResource : Resource
Inheritance
IdentityResource
Derived
Inherited Members

Constructors

IdentityResource()

An empty identity resource, for an initializer or a configuration binder to fill.

public IdentityResource()

IdentityResource(string, IEnumerable<string>)

An identity resource whose display name is its name.

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

Parameters

name string

The unique name of the identity resource — the scope a client requests.

userClaims IEnumerable<string>

The user claim types the scope issues.

Exceptions

ArgumentException

name is null or empty.

ArgumentNullException

userClaims is null.

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

An identity resource with a display name.

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

Parameters

name string

The unique name of the identity resource — the scope a client requests.

displayName string

What the consent screen calls it.

userClaims IEnumerable<string>

The user claim types the scope issues.

Exceptions

ArgumentException

name is null or empty.

ArgumentNullException

userClaims is null.

Properties

Emphasize

Whether the consent screen highlights this scope. Defaults to false.

public bool Emphasize { get; set; }

Property Value

bool

Required

Whether the consent screen may not toggle this scope off. Defaults to false.

public bool Required { get; set; }

Property Value

bool