From 9deeb9c8aa4548063b09ad6b9c07e1e60a4f26f8 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Mon, 28 Mar 2022 12:59:59 +0800 Subject: [PATCH] the old client needs to transition --- .../IdentityServerDataSeedContributor.cs | 17 +++++++++++++---- .../appsettings.Development.json | 3 +++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs b/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs index a23f7e0c3..5035cec86 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs +++ b/aspnet-core/services/LY.MicroService.identityServer/DataSeeder/IdentityServerDataSeedContributor.cs @@ -190,12 +190,21 @@ public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransien ); } - //Console Test Client - var consoleClientId = configurationSection["AuthVueAdmin:ClientId"]; - if (!consoleClientId.IsNullOrWhiteSpace()) + var vueClientId = configurationSection["AuthVueAdmin:ClientId"]; + if (!vueClientId.IsNullOrWhiteSpace()) { await CreateClientAsync( - consoleClientId, + vueClientId, + commonScopes.Union(new[] { "lingyun-abp-application" }), + new[] { "password", "client_credentials" }, + commonSecret + ); + } + var vueOldClientId = configurationSection["AuthOldVueAdmin:ClientId"]; + if (!vueOldClientId.IsNullOrWhiteSpace()) + { + await CreateClientAsync( + vueOldClientId, commonScopes.Union(new[] { "lingyun-abp-application" }), new[] { "password", "client_credentials" }, commonSecret diff --git a/aspnet-core/services/LY.MicroService.identityServer/appsettings.Development.json b/aspnet-core/services/LY.MicroService.identityServer/appsettings.Development.json index 9115acc9d..4dd7e1adc 100644 --- a/aspnet-core/services/LY.MicroService.identityServer/appsettings.Development.json +++ b/aspnet-core/services/LY.MicroService.identityServer/appsettings.Development.json @@ -60,6 +60,9 @@ "AuthVueAdmin": { "ClientId": "vue-admin-client" }, + "AuthOldVueAdmin": { + "ClientId": "vue-admin-element" + }, "InternalService": { "ClientId": "InternalServiceClient" }