我一直在努力使用IdentityServer 3作为IDP,使用Sitecore 9进行联合身份验证.我已经按照http://blog.baslijten.com/enable-federated-authentication-and-configure-auth0-as-an-identity-provider-in-sitecore-9-0/中的示例查看了Auth0,并且已将其转换为IDS3.但我所经历的是IDP和Sitecore之间的无限循环.
似乎在身份验证时,IdentityServer 3会重定向回Sitecore,而Sitecore无法将身份验证转换为Cookie.我留下了一个.nonce cookie.Sitecore没有看到经过身份验证的用户,会重定向到IDP,直到我停止进程.
我的IdentityProviderProcessor(带虚拟值):
using System.Threading.Tasks;
using Microsoft.Owin.Security.Cookies;
using Microsoft.Owin.Security.OpenIdConnect;
using Owin;
using Sitecore.Diagnostics;
using Sitecore.Owin.Authentication.Configuration;
using Sitecore.Owin.Authentication.Pipelines.IdentityProviders;
using Sitecore.Owin.Authentication.Services;
namespace xx.xxxx.SC.Foundation.Authentication
{
public class IdentityProviderProcessor : IdentityProvidersProcessor
{
public IdentityProviderProcessor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration) : base(federatedAuthenticationConfiguration)
{
}
/// <summary>
/// Identityprovidr name. Has to match the configuration
/// </summary>
protected override string IdentityProviderName
{
get { return "ids3"; }
}
protected override void ProcessCore(IdentityProvidersArgs args)
{
Assert.ArgumentNotNull(args, "args");
IdentityProvider identityProvider = this.GetIdentityProvider();
string authenticationType = this.GetAuthenticationType(); …Run Code Online (Sandbox Code Playgroud)