Table of Contents

Class DeviceCode

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

A pending device authorization: what the device asked for, and what the user has decided so far.

public sealed class DeviceCode
Inheritance
DeviceCode
Inherited Members

Remarks

One record is reached by two different keys. The device polls with its device code, and the user approves with the short user code they read off the screen, so the store has to find the same request from either.

Properties

AuthorizedScopes

The scopes the user actually granted. Empty on an authorized request means the user declined.

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

Property Value

ICollection<string>

ClientId

The client the device authenticated as.

public string ClientId { get; set; }

Property Value

string

CreationTime

When the request was created (UTC).

public DateTime CreationTime { get; set; }

Property Value

DateTime

Description

Optional description the user gave the device.

public string? Description { get; set; }

Property Value

string

IsAuthorized

Whether the user has finished deciding. False means the device should keep polling.

public bool IsAuthorized { get; set; }

Property Value

bool

Lifetime

How long the user has to approve, in seconds.

public int Lifetime { get; set; }

Property Value

int

RequestedScopes

The scopes the device asked for.

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

Property Value

ICollection<string>

SessionId

The session the approval was made in.

public string? SessionId { get; set; }

Property Value

string

SubjectId

The subject that approved the request, once one has.

public string? SubjectId { get; set; }

Property Value

string