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
namestringThe unique name of the identity resource — the scope a client requests.
userClaimsIEnumerable<string>The user claim types the scope issues.
Exceptions
- ArgumentException
nameis null or empty.- ArgumentNullException
userClaimsis null.
IdentityResource(string, string?, IEnumerable<string>)
An identity resource with a display name.
public IdentityResource(string name, string? displayName, IEnumerable<string> userClaims)
Parameters
namestringThe unique name of the identity resource — the scope a client requests.
displayNamestringWhat the consent screen calls it.
userClaimsIEnumerable<string>The user claim types the scope issues.
Exceptions
- ArgumentException
nameis null or empty.- ArgumentNullException
userClaimsis null.
Properties
Emphasize
Whether the consent screen highlights this scope. Defaults to false.
public bool Emphasize { get; set; }
Property Value
Required
Whether the consent screen may not toggle this scope off. Defaults to false.
public bool Required { get; set; }