From c7a9a267ffae34e2fb1dcb0c83440b97cac0276a Mon Sep 17 00:00:00 2001 From: ShaoHua <345265198@qqcom> Date: Thu, 22 Jan 2026 22:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95gitea=E5=B0=86=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=A1=B9=E7=9B=AE=E4=BD=9C=E4=B8=BA=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenIddictDataSeedContributor.cs | 28 ------------------- .../appsettings.json | 6 ++-- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/src/Hua.Abp.Demo.Domain/OpenIddict/OpenIddictDataSeedContributor.cs b/src/Hua.Abp.Demo.Domain/OpenIddict/OpenIddictDataSeedContributor.cs index 58a2c67..7ab16bd 100644 --- a/src/Hua.Abp.Demo.Domain/OpenIddict/OpenIddictDataSeedContributor.cs +++ b/src/Hua.Abp.Demo.Domain/OpenIddict/OpenIddictDataSeedContributor.cs @@ -113,34 +113,6 @@ public class OpenIddictDataSeedContributor : OpenIddictDataSeedContributorBase, ); } - // Git Client - var gitClientId = configurationSection["Demo_Git:ClientId"]; - if (!gitClientId.IsNullOrWhiteSpace()) - { - var gitRootUrl = configurationSection["Demo_Git:RootUrl"]?.TrimEnd('/'); - var gitClientSecret = configurationSection["Demo_Git:ClientSecret"]; - - await CreateOrUpdateApplicationAsync( - applicationType: OpenIddictConstants.ApplicationTypes.Web, - name: gitClientId!, - type: OpenIddictConstants.ClientTypes.Confidential, - consentType: OpenIddictConstants.ConsentTypes.Implicit, - displayName: "Git Application", - secret: gitClientSecret, - grantTypes: new List { - OpenIddictConstants.GrantTypes.AuthorizationCode, - OpenIddictConstants.GrantTypes.RefreshToken - }, - scopes: commonScopes, - redirectUris: new List { - $"{gitRootUrl}/users/auth/openid_connect/callback", - $"{gitRootUrl}/user/oauth2/Abp.Demo/callback" - }, - postLogoutRedirectUris: new List { $"{gitRootUrl}" }, - clientUri: gitRootUrl - ); - } - } } diff --git a/src/Hua.Abp.Demo.HttpApi.Host/appsettings.json b/src/Hua.Abp.Demo.HttpApi.Host/appsettings.json index d2f9d32..b59c83f 100644 --- a/src/Hua.Abp.Demo.HttpApi.Host/appsettings.json +++ b/src/Hua.Abp.Demo.HttpApi.Host/appsettings.json @@ -11,8 +11,8 @@ "Default": "Host=localhost;Port=5432;Database=Demo;User ID=postgres;Password=123456;" }, "AuthServer": { - "Authority": "http://192.168.31.2:5000", - "RequireHttpsMetadata": false, + "Authority": "https://localhost:44322", + "RequireHttpsMetadata": true, "SwaggerClientId": "Demo_Swagger", "CertificatePassPhrase": "a8dad6bd-08cf-40f9-baaf-873686b50b75" }, @@ -23,7 +23,7 @@ }, "Demo_Git": { "ClientId": "Demo_Git", - "ClientSecret": "88077533-3e06-4447-818d-29472e340a6e", + "ClientSecret": "36577533-3e09-4447-818d-29472e340d9f", "RootUrl": "https://git.we965.cn" } },