View Source
Class AppBuilderExtensions
Provides security/identity extension methods to IAppBuilder.
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public static class AppBuilderExtensions
Methods
View Source
ConfigureUserManagerForUmbracoBackOffice(IAppBuilder, IRuntimeState, IContentSection, IGlobalSettings, MembershipProviderBase, BackOfficeUserStore)
Configure a custom UserStore with the Identity User Manager for Umbraco
Declaration
public static void ConfigureUserManagerForUmbracoBackOffice(this IAppBuilder app, IRuntimeState runtimeState, IContentSection contentSettings, IGlobalSettings globalSettings, MembershipProviderBase userMembershipProvider, BackOfficeUserStore customUserStore)
Parameters
View Source
ConfigureUserManagerForUmbracoBackOffice(IAppBuilder, ServiceContext, UmbracoMapper, IContentSection, IGlobalSettings, MembershipProviderBase)
Configure Default Identity User Manager for Umbraco
Declaration
public static void ConfigureUserManagerForUmbracoBackOffice(this IAppBuilder app, ServiceContext services, UmbracoMapper mapper, IContentSection contentSettings, IGlobalSettings globalSettings, MembershipProviderBase userMembershipProvider)
Parameters
View Source
ConfigureUserManagerForUmbracoBackOffice<TManager, TUser>(IAppBuilder, IRuntimeState, IGlobalSettings, Func<IdentityFactoryOptions<TManager>, IOwinContext, TManager>)
Configure a custom BackOfficeUserManager for Umbraco
Declaration
public static void ConfigureUserManagerForUmbracoBackOffice<TManager, TUser>(this IAppBuilder app, IRuntimeState runtimeState, IGlobalSettings globalSettings, Func<IdentityFactoryOptions<TManager>, IOwinContext, TManager> userManager)
where TManager : BackOfficeUserManager<TUser> where TUser : BackOfficeIdentityUser
Parameters
Type |
Name |
Description |
IAppBuilder |
app |
|
IRuntimeState |
runtimeState |
|
IGlobalSettings |
globalSettings |
|
System.Func<IdentityFactoryOptions<TManager>, IOwinContext, TManager> |
userManager |
|
Type Parameters
Name |
Description |
TManager |
|
TUser |
|
View Source
CreateUmbracoCookieAuthOptions(IAppBuilder, IUmbracoContextAccessor, IGlobalSettings, IRuntimeState, ISecuritySection, String[])
Create the default umb cookie auth options
Declaration
public static UmbracoBackOfficeCookieAuthOptions CreateUmbracoCookieAuthOptions(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IGlobalSettings globalSettings, IRuntimeState runtimeState, ISecuritySection securitySettings, string[] explicitPaths = null)
Parameters
Returns
View Source
SanitizeThreadCulture(IAppBuilder)
Declaration
public static void SanitizeThreadCulture(this IAppBuilder app)
Parameters
Type |
Name |
Description |
IAppBuilder |
app |
|
View Source
UseUmbracoBackOfficeCookieAuthentication(IAppBuilder, IUmbracoContextAccessor, IRuntimeState, IGlobalSettings, ISecuritySection, CookieAuthenticationOptions, PipelineStage)
Ensures that the UmbracoBackOfficeAuthenticationMiddleware is assigned to the pipeline
Declaration
public static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IRuntimeState runtimeState, IGlobalSettings globalSettings, ISecuritySection securitySection, CookieAuthenticationOptions cookieOptions, PipelineStage stage)
Parameters
Type |
Name |
Description |
IAppBuilder |
app |
|
IUmbracoContextAccessor |
umbracoContextAccessor |
|
IRuntimeState |
runtimeState |
|
IGlobalSettings |
globalSettings |
|
ISecuritySection |
securitySection |
|
CookieAuthenticationOptions |
cookieOptions |
Custom auth cookie options can be specified to have more control over the cookie authentication logic
|
PipelineStage |
stage |
Configurable pipeline stage
|
Returns
Type |
Description |
IAppBuilder |
|
View Source
UseUmbracoBackOfficeCookieAuthentication(IAppBuilder, IUmbracoContextAccessor, IRuntimeState, IUserService, IGlobalSettings, ISecuritySection)
Ensures that the UmbracoBackOfficeAuthenticationMiddleware is assigned to the pipeline
Declaration
public static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IRuntimeState runtimeState, IUserService userService, IGlobalSettings globalSettings, ISecuritySection securitySection)
Parameters
Returns
Type |
Description |
IAppBuilder |
|
View Source
UseUmbracoBackOfficeCookieAuthentication(IAppBuilder, IUmbracoContextAccessor, IRuntimeState, IUserService, IGlobalSettings, ISecuritySection, PipelineStage)
Ensures that the UmbracoBackOfficeAuthenticationMiddleware is assigned to the pipeline
Declaration
public static IAppBuilder UseUmbracoBackOfficeCookieAuthentication(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IRuntimeState runtimeState, IUserService userService, IGlobalSettings globalSettings, ISecuritySection securitySection, PipelineStage stage)
Parameters
Returns
Type |
Description |
IAppBuilder |
|
View Source
UseUmbracoBackOfficeExternalCookieAuthentication(IAppBuilder, IUmbracoContextAccessor, IRuntimeState, IGlobalSettings)
Ensures that the cookie middleware for validating external logins is assigned to the pipeline with the correct
Umbraco back office configuration
Declaration
public static IAppBuilder UseUmbracoBackOfficeExternalCookieAuthentication(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IRuntimeState runtimeState, IGlobalSettings globalSettings)
Parameters
Returns
Type |
Description |
IAppBuilder |
|
View Source
UseUmbracoBackOfficeExternalCookieAuthentication(IAppBuilder, IUmbracoContextAccessor, IRuntimeState, IGlobalSettings, PipelineStage)
Ensures that the cookie middleware for validating external logins is assigned to the pipeline with the correct
Umbraco back office configuration
Declaration
public static IAppBuilder UseUmbracoBackOfficeExternalCookieAuthentication(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IRuntimeState runtimeState, IGlobalSettings globalSettings, PipelineStage stage)
Parameters
Returns
Type |
Description |
IAppBuilder |
|
View Source
UseUmbracoBackOfficeExternalLoginErrors(IAppBuilder, PipelineStage)
Enable the back office to detect and handle errors registered with external login providers
Declaration
public static IAppBuilder UseUmbracoBackOfficeExternalLoginErrors(this IAppBuilder app, PipelineStage stage = null)
Parameters
Type |
Name |
Description |
IAppBuilder |
app |
|
PipelineStage |
stage |
|
Returns
Type |
Description |
IAppBuilder |
|
View Source
UseUmbracoPreviewAuthentication(IAppBuilder, IUmbracoContextAccessor, IRuntimeState, IGlobalSettings, ISecuritySection)
In order for preview to work this needs to be called
Declaration
public static IAppBuilder UseUmbracoPreviewAuthentication(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IRuntimeState runtimeState, IGlobalSettings globalSettings, ISecuritySection securitySettings)
Parameters
Returns
Type |
Description |
IAppBuilder |
|
View Source
UseUmbracoPreviewAuthentication(IAppBuilder, IUmbracoContextAccessor, IRuntimeState, IGlobalSettings, ISecuritySection, PipelineStage)
In order for preview to work this needs to be called
Declaration
public static IAppBuilder UseUmbracoPreviewAuthentication(this IAppBuilder app, IUmbracoContextAccessor umbracoContextAccessor, IRuntimeState runtimeState, IGlobalSettings globalSettings, ISecuritySection securitySettings, PipelineStage stage)
Parameters
Returns
Type |
Description |
IAppBuilder |
|