【发布时间】:2022-01-15 03:39:38
【问题描述】:
当我准备在我的解决方案中更新 IdentityServer 项目时,我遇到了一些问题。
在登录方式中:
IdentityServer/Quickstart/Account/AccountController.cs
- ConsentResponse 不包含 Denied 的定义。
await _interaction.GrantConsentAsync(context, ConsentResponse.Denied);
- IClientStore 不包含 IsPkceClientAsync 的定义。
if (await _clientStore.IsPkceClientAsync(context.ClientId))
在 BuildLoginViewModelAsync 方法中:
IdentityServer/Quickstart/Account/AccountController.cs
- AccountOptions 不包含 WindowsAuthenticationSchemeName 的定义
var providers = schemes
.Where(x => x.DisplayName != null ||
(x.Name.Equals(AccountOptions.WindowsAuthenticationSchemeName, StringComparison.OrdinalIgnoreCase))
)
.Select(x => new ExternalProvider
{
DisplayName = x.DisplayName,
AuthenticationScheme = x.Name
}).ToList();
- AuthorizationRequest 不包含 ClientId 的定义
var client = await _clientStore.FindEnabledClientByIdAsync(context.ClientId);
在回调方法中:
IdentityServer/Quickstart/Account/ExternalController.cs
- 当前上下文中不存在名称“ProcessLoginCallbackForOidc”
ProcessLoginCallbackForOidc(result, additionalLocalClaims, localSignInProps);
ProcessLoginCallbackForWsFed(result, additionalLocalClaims, localSignInProps);
ProcessLoginCallbackForSaml2p(result, additionalLocalClaims, localSignInProps);
- 没有重载方法“SignInAsync”需要 5 个参数。
await HttpContext.SignInAsync(user.Id, name, provider, localSignInProps, additionalLocalClaims.ToArray());
【问题讨论】:
标签: c# asp.net-core identityserver4