SaaS CMS has officially launched! Learn more now.

Class IUserImpersonationExtensions

Inheritance
System.Object
IUserImpersonationExtensions
Namespace: EPiServer.Security
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public static class IUserImpersonationExtensions : Object

Methods

CreatePrincipal(IUserImpersonation, String)

Create a principal based on a user name and add roles from the current SecurityEntityProvider

Declaration
public static IPrincipal CreatePrincipal(this IUserImpersonation userImpersonation, string userName)
Parameters
Type Name Description
IUserImpersonation userImpersonation
System.String userName
Returns
Type Description
System.Security.Principal.IPrincipal
Remarks

This is no validation done, if the user does not exist it will be created without roles