4

我想使用 IdentiyServer4 并添加 KentorAuthServices 中间件进行 SAML 身份验证。

IdentityServer4 文档中,它建议添加Microsoft.AspNetCore.Authentication.Cookies包并使用带有 SignIn 类型的中间件作为IdentityServerConstants.ExternalCookieAuthenticationScheme.

我配置相同,但无法在变量中获取 access_token info

        public async Task<IActionResult> ExternalLoginCallback(string returnUrl = null, string remoteError = null)
        {
            if (remoteError != null)
            {
                ModelState.AddModelError(string.Empty, $"Error from external provider: {remoteError}");
                return View("~/Home/Index");
            }

            var info = await _signInManager.GetExternalLoginInfoAsync();
        }

info.AuthenticationTokens在这里,我在属性中得到零条目。我是否需要在 Kentor.AuthServices (aspnetcorebranch) 中进行一些自定义以支持访问令牌或需要在 identityserver4 中进行配置

4

0 回答 0