测试gitea将当前项目作为认证源
This commit is contained in:
@@ -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<string> {
|
|
||||||
OpenIddictConstants.GrantTypes.AuthorizationCode,
|
|
||||||
OpenIddictConstants.GrantTypes.RefreshToken
|
|
||||||
},
|
|
||||||
scopes: commonScopes,
|
|
||||||
redirectUris: new List<string> {
|
|
||||||
$"{gitRootUrl}/users/auth/openid_connect/callback",
|
|
||||||
$"{gitRootUrl}/user/oauth2/Abp.Demo/callback"
|
|
||||||
},
|
|
||||||
postLogoutRedirectUris: new List<string> { $"{gitRootUrl}" },
|
|
||||||
clientUri: gitRootUrl
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
"Default": "Host=localhost;Port=5432;Database=Demo;User ID=postgres;Password=123456;"
|
"Default": "Host=localhost;Port=5432;Database=Demo;User ID=postgres;Password=123456;"
|
||||||
},
|
},
|
||||||
"AuthServer": {
|
"AuthServer": {
|
||||||
"Authority": "http://192.168.31.2:5000",
|
"Authority": "https://localhost:44322",
|
||||||
"RequireHttpsMetadata": false,
|
"RequireHttpsMetadata": true,
|
||||||
"SwaggerClientId": "Demo_Swagger",
|
"SwaggerClientId": "Demo_Swagger",
|
||||||
"CertificatePassPhrase": "a8dad6bd-08cf-40f9-baaf-873686b50b75"
|
"CertificatePassPhrase": "a8dad6bd-08cf-40f9-baaf-873686b50b75"
|
||||||
},
|
},
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"Demo_Git": {
|
"Demo_Git": {
|
||||||
"ClientId": "Demo_Git",
|
"ClientId": "Demo_Git",
|
||||||
"ClientSecret": "88077533-3e06-4447-818d-29472e340a6e",
|
"ClientSecret": "36577533-3e09-4447-818d-29472e340d9f",
|
||||||
"RootUrl": "https://git.we965.cn"
|
"RootUrl": "https://git.we965.cn"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user