Changes to Basic Auth to support external logins (#12434)

* Fixed issues with basic auth middleware to support Umbraco Cloud usecase

* Fix redirects to return url, now allows website urls

* Strip potential domain part of returnPath

* Fix default value in appsettings schema

* Reintroduce check of basic auth enabled.

* Fix wrong negation introduced in #12349

* Fixed issues with redirects

* Also check external login cookie, while authenticating backoffice
This commit is contained in:
Bjarke Berg
2022-06-02 12:19:22 +02:00
committed by GitHub
parent f4e333c178
commit faf06be618
9 changed files with 102 additions and 19 deletions

View File

@@ -23,5 +23,18 @@ namespace Umbraco.Cms.Core.Configuration.Models
public string[] AllowedIPs { get; set; } = Array.Empty<string>();
public SharedSecret SharedSecret { get; set; } = new SharedSecret();
public bool RedirectToLoginPage { get; set; } = false;
}
public class SharedSecret
{
private const string StaticHeaderName = "X-Authentication-Shared-Secret";
[DefaultValue(StaticHeaderName)]
public string? HeaderName { get; set; } = StaticHeaderName;
public string? Value { get; set; }
}
}