public static IConfigurationBuilder AddIdentityServerWithAbpIntegration(
this IServiceCollection services,
IConfiguration configuration,
string certificateName)
{
// 1. ABP 平台集成 IdentityServer4
// ...
// 2. 配置 IdentityServer4
// ...
// 3.IdentityServer4.Abp.* 相关配置和服务注册
// ...
// 4. 增加对 ABP.IO 租户的支持
services.Configure
public class GitHubIdentityProvider : IExternalAuthenticationProvider { private readonly IHttpContextAccessor _httpContextAccessor;
public GitHubIdentityProvider(IHttpContextAccessor httpContextAccessor)
{
_httpContextAccessor = httpContextAccessor;
}
public string Name => "GitHub";
public async Task AuthenticateAsync(ExternalAuthenticateContext context)
{
var providerKeyClaim = context.GetClaimValue(ClaimTypes.NameIdentifier);
// Call GitHub API to