Changes SchemeForBackOffice to just ensure it is prefixed with "Umbraco.".

https://github.com/umbraco/UmbracoDocs/pull/3438#discussion_r703981003
This commit is contained in:
Bjarke Berg
2021-09-08 17:49:56 +02:00
parent 8dd645f36e
commit 6558ed9b0c

View File

@@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using Umbraco.Extensions;
using Constants = Umbraco.Cms.Core.Constants;
namespace Umbraco.Cms.Web.BackOffice.Security
@@ -22,7 +23,7 @@ namespace Umbraco.Cms.Web.BackOffice.Security
=> _loginProviderOptions = loginProviderOptions ?? (x => { });
public string SchemeForBackOffice(string scheme)
=> Constants.Security.BackOfficeExternalAuthenticationTypePrefix + scheme;
=> scheme?.EnsureStartsWith(Constants.Security.BackOfficeExternalAuthenticationTypePrefix);
/// <summary>
/// Overridden to track the final authenticationScheme being registered for the external login