V14: Remove old backoffice project. (#15752)
* Move magical route to management api * Move auth around * Remove "New" cookies, as they are no longer needed * Move all installer related * Remove BackOfficeServerVariables.cs and trees * Move webhooks to management api * Remove remainting controllers * Remove last services * Move preview to management api * Remove mroe extensions * Remove tours * Remove old Auth handlers * Remove server variables entirely * Remove old backoffice controller * Remove controllers namespace entirely * Move rest of preview * move last services * Move language file extension * Remove old backoffice entirely (Backoffice and Web.UI projects) * Clean up unused security classes * Fix up installer route * Remove obsolete tests * Fix up DI in integration test * Add missing property mapping * Move core mapping into core * Add composers to integration test * remove identity * Fix up DI * Outcomment failing test :) * Fix up remaining test * Update mapper * Remove the actual project files * Remove backoffice cs proj * Remove old backoffice from yml * Run belissima before login * Remove caching * Refactor file paths * Remove belle from static assets * Dont refer to old project in templates * update gitignore * Add missing files * Remove install view as its no longer used * Fix up failing test * Remove outcommented code * Update submodule to latest * fix build --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -19,13 +19,12 @@ public static class BackOfficeAuthBuilderExtensions
|
||||
builder
|
||||
.AddAuthentication()
|
||||
.AddUmbracoOpenIddict()
|
||||
.AddBackOfficeLogin()
|
||||
.AddTokenRevocation();
|
||||
.AddBackOfficeLogin();
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
private static IUmbracoBuilder AddTokenRevocation(this IUmbracoBuilder builder)
|
||||
public static IUmbracoBuilder AddTokenRevocation(this IUmbracoBuilder builder)
|
||||
{
|
||||
builder.AddNotificationAsyncHandler<UserSavingNotification, RevokeUserAuthenticationTokensNotificationHandler>();
|
||||
builder.AddNotificationAsyncHandler<UserSavedNotification, RevokeUserAuthenticationTokensNotificationHandler>();
|
||||
@@ -52,28 +51,29 @@ public static class BackOfficeAuthBuilderExtensions
|
||||
{
|
||||
builder.Services
|
||||
.AddAuthentication()
|
||||
.AddCookie(Constants.Security.NewBackOfficeAuthenticationType, options =>
|
||||
// Add our custom schemes which are cookie handlers
|
||||
.AddCookie(Constants.Security.BackOfficeAuthenticationType, options =>
|
||||
{
|
||||
options.LoginPath = "/umbraco/login";
|
||||
options.Cookie.Name = Constants.Security.NewBackOfficeAuthenticationType;
|
||||
options.Cookie.Name = Constants.Security.BackOfficeAuthenticationType;
|
||||
})
|
||||
.AddCookie(Constants.Security.NewBackOfficeExternalAuthenticationType, options =>
|
||||
.AddCookie(Constants.Security.BackOfficeExternalAuthenticationType, o =>
|
||||
{
|
||||
options.Cookie.Name = Constants.Security.NewBackOfficeExternalAuthenticationType;
|
||||
options.ExpireTimeSpan = TimeSpan.FromMinutes(5);
|
||||
o.Cookie.Name = Constants.Security.BackOfficeExternalAuthenticationType;
|
||||
o.ExpireTimeSpan = TimeSpan.FromMinutes(5);
|
||||
})
|
||||
|
||||
// Although we don't natively support this, we add it anyways so that if end-users implement the required logic
|
||||
// they don't have to worry about manually adding this scheme or modifying the sign in manager
|
||||
.AddCookie(Constants.Security.NewBackOfficeTwoFactorAuthenticationType, options =>
|
||||
.AddCookie(Constants.Security.BackOfficeTwoFactorAuthenticationType, options =>
|
||||
{
|
||||
options.Cookie.Name = Constants.Security.NewBackOfficeTwoFactorAuthenticationType;
|
||||
options.Cookie.Name = Constants.Security.BackOfficeTwoFactorAuthenticationType;
|
||||
options.ExpireTimeSpan = TimeSpan.FromMinutes(5);
|
||||
})
|
||||
.AddCookie(Constants.Security.NewBackOfficeTwoFactorRememberMeAuthenticationType, options =>
|
||||
.AddCookie(Constants.Security.BackOfficeTwoFactorRememberMeAuthenticationType, o =>
|
||||
{
|
||||
options.Cookie.Name = Constants.Security.NewBackOfficeTwoFactorRememberMeAuthenticationType;
|
||||
options.ExpireTimeSpan = TimeSpan.FromMinutes(5);
|
||||
o.Cookie.Name = Constants.Security.BackOfficeTwoFactorRememberMeAuthenticationType;
|
||||
o.ExpireTimeSpan = TimeSpan.FromMinutes(5);
|
||||
});
|
||||
|
||||
return builder;
|
||||
|
||||
Reference in New Issue
Block a user