From cead9c1b8f0c866a33cd8161aecdfcfc5aabafb0 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Mon, 27 Jul 2020 08:43:45 +0800 Subject: [PATCH] Remove ITransientDependency interface from the DeviceFlowStore class. Resolve #4883 --- .../Abp/IdentityServer/Devices/DeviceFlowStore.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs index ba0ef757fe..25432e2d58 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs @@ -5,20 +5,19 @@ using IdentityServer4.Models; using IdentityServer4.Stores; using IdentityServer4.Stores.Serialization; using JetBrains.Annotations; -using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; namespace Volo.Abp.IdentityServer.Devices { - public class DeviceFlowStore : IDeviceFlowStore, ITransientDependency + public class DeviceFlowStore : IDeviceFlowStore { protected IDeviceFlowCodesRepository DeviceFlowCodesRepository { get; } protected IGuidGenerator GuidGenerator { get; } protected IPersistentGrantSerializer PersistentGrantSerializer { get; } public DeviceFlowStore( - IDeviceFlowCodesRepository deviceFlowCodesRepository, - IGuidGenerator guidGenerator, + IDeviceFlowCodesRepository deviceFlowCodesRepository, + IGuidGenerator guidGenerator, IPersistentGrantSerializer persistentGrantSerializer) { DeviceFlowCodesRepository = deviceFlowCodesRepository; @@ -46,7 +45,7 @@ namespace Volo.Abp.IdentityServer.Devices } ); } - + public virtual async Task FindByUserCodeAsync(string userCode) { Check.NotNull(userCode, nameof(userCode)); @@ -70,7 +69,7 @@ namespace Volo.Abp.IdentityServer.Devices var deviceCodes = await DeviceFlowCodesRepository .FindByDeviceCodeAsync(deviceCode) ; - + if (deviceCodes == null) { return null;