Class ApiScope
- Namespace
- Fdyay.IdentityServer.Models
- Assembly
- Fdyay.IdentityServer.Core.dll
Models an OAuth 2.0 scope that can be requested for access tokens.
public class ApiScope : Resource
- Inheritance
-
ApiScope
- Inherited Members
Constructors
ApiScope()
An empty scope, for an initializer or a configuration binder to fill.
public ApiScope()
ApiScope(string)
A scope whose display name is its name.
public ApiScope(string name)
Parameters
namestringThe unique name of the scope.
Exceptions
- ArgumentException
nameis null or empty.
ApiScope(string, IEnumerable<string>)
A scope whose display name is its name, carrying the user claims named.
public ApiScope(string name, IEnumerable<string> userClaims)
Parameters
namestringThe unique name of the scope.
userClaimsIEnumerable<string>The user claim types issued for it.
Exceptions
- ArgumentException
nameis null or empty.
ApiScope(string, string?)
A scope with a display name.
public ApiScope(string name, string? displayName)
Parameters
Exceptions
- ArgumentException
nameis null or empty.
ApiScope(string, string?, IEnumerable<string>?)
A scope with a display name, carrying the user claims named.
public ApiScope(string name, string? displayName, IEnumerable<string>? userClaims)
Parameters
namestringThe unique name of the scope.
displayNamestringWhat the consent screen calls it.
userClaimsIEnumerable<string>The user claim types issued for it, or null for none.
Exceptions
- ArgumentException
nameis null or empty.
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; }