Hi,
I am trying to set up a federated login scheme against AD in CMS12, .NET Core 8 using cookies, but I it redirects to the default yellow/white login screen /Util/Login?ReturnUrl=%2F both locally and on integration environment instead of redirecting to MetadataAddress. Before we ran OWIN but, now we are upgrading to latest CMS 12.
What I have done:
- I set the start page controller to [Authorize] to trigger the login
- Configuration defined in Startup.cs in ConfigureServices
- services.AddAuthentication is configurated
- sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
- sharedOptions.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
- sharedOptions.DefaultChallengeScheme = WsFederationDefaults.AuthenticationScheme;
- AddWsFederation has defined MetadataAddress and Wtrealm (checked in debug that they are correct values) and OnSecurityTokenValidated for processing the returned security token
- AddCookie is defined with Cookie.Name, expiry and a few things to be done before login
- In Configure section I have app.UseAuthentication(); and app.UseAuthorization();
In appsettings:
{
"EPiServer": {
"Login": {
"Wtrealm": "https://our.address",
"MetadataAddress": "https://our.address/federationmetadata/2007-06/federationmetadata.xml"
}
}
}
Has anyone had this behavior before? I am thinking I missed something easy :S
/ Tony