Table of Contents

Interface IDeviceFlowCodeService

Namespace
Fdyay.IdentityServer.Services
Assembly
Fdyay.IdentityServer.Core.dll

Device authorizations, kept so that the store never holds a code as issued. Duende's.

public interface IDeviceFlowCodeService

Remarks

Everything that reads or writes a device authorization comes through here — the device authorization endpoint, the token endpoint's device grant, the approval page — and this is where the device code is made and where both codes are hashed on their way to IDeviceFlowStore. Duende 8.0.1's IDeviceFlowCodeService, measured.

Methods

FindByDeviceCodeAsync(string, CancellationToken)

The authorization for a device code, or null.

Task<DeviceCode?> FindByDeviceCodeAsync(string deviceCode, CancellationToken cancellationToken = default)

Parameters

deviceCode string
cancellationToken CancellationToken

Returns

Task<DeviceCode>

FindByUserCodeAsync(string, CancellationToken)

The authorization for a user code, or null.

Task<DeviceCode?> FindByUserCodeAsync(string userCode, CancellationToken cancellationToken = default)

Parameters

userCode string
cancellationToken CancellationToken

Returns

Task<DeviceCode>

RemoveByDeviceCodeAsync(string, CancellationToken)

Removes the authorization for a device code.

Task RemoveByDeviceCodeAsync(string deviceCode, CancellationToken cancellationToken = default)

Parameters

deviceCode string
cancellationToken CancellationToken

Returns

Task

StoreDeviceAuthorizationAsync(string, DeviceCode, CancellationToken)

Makes a device code, stores the authorization under it and the user code, and returns the device code.

Task<string> StoreDeviceAuthorizationAsync(string userCode, DeviceCode data, CancellationToken cancellationToken = default)

Parameters

userCode string
data DeviceCode
cancellationToken CancellationToken

Returns

Task<string>

UpdateByUserCodeAsync(string, DeviceCode, CancellationToken)

Replaces the authorization for a user code — an approval or a denial.

Task UpdateByUserCodeAsync(string userCode, DeviceCode data, CancellationToken cancellationToken = default)

Parameters

userCode string
data DeviceCode
cancellationToken CancellationToken

Returns

Task