Table of Contents

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

name string

The unique name of the scope.

Exceptions

ArgumentException

name is 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

name string

The unique name of the scope.

userClaims IEnumerable<string>

The user claim types issued for it.

Exceptions

ArgumentException

name is null or empty.

ApiScope(string, string?)

A scope with a display name.

public ApiScope(string name, string? displayName)

Parameters

name string

The unique name of the scope.

displayName string

What the consent screen calls it.

Exceptions

ArgumentException

name is 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

name string

The unique name of the scope.

displayName string

What the consent screen calls it.

userClaims IEnumerable<string>

The user claim types issued for it, or null for none.

Exceptions

ArgumentException

name is null or empty.

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