SaaS CMS has officially launched! Learn more now.

Class MembershipRegistrar

Uses Membership provider to self registered users

Inheritance
System.Object
MembershipRegistrar
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Security
Assembly: EPiServer.Commerce.Security.dll
Version: 11.8.3
Syntax
public class MembershipRegistrar : IRegistrar

Constructors

MembershipRegistrar()

Declaration
public MembershipRegistrar()

Properties

AuthenticationType

Gets the type of the authentication. This should be the Authentication type that is used when registering with the IOwinContext

Declaration
public string AuthenticationType { get; }
Property Value
Type Description
System.String

The type of the authentication.

Methods

ChangePassword(String, String, String)

Changes the password.

Declaration
public virtual bool ChangePassword(string userName, string oldPassword, string newPassword)
Parameters
Type Name Description
System.String userName

Name of the user.

System.String oldPassword

The old password.

System.String newPassword

The new password.

Returns
Type Description
System.Boolean

True if the password was succesfully changed.

CreateIdentity(String)

Creates the identity.

Declaration
public virtual ClaimsIdentity CreateIdentity(string userName)
Parameters
Type Name Description
System.String userName

Name of the user.

Returns
Type Description
System.Security.Claims.ClaimsIdentity

An System.Security.Claims.ClaimsIdentity for the username

CreateUser(String, String, String)

Creates the user.

Declaration
public virtual ClaimsPrincipal CreateUser(string userName, string password, string email)
Parameters
Type Name Description
System.String userName

Name of the user.

System.String password

The password.

System.String email

The email of the user.

Returns
Type Description
System.Security.Claims.ClaimsPrincipal

An System.Security.Principal.IPrincipal for the newly created user

DeleteUser(String)

Deletes the user.

Declaration
public virtual void DeleteUser(string userName)
Parameters
Type Name Description
System.String userName

Name of the user.

SignIn(AuthenticationProperties, ClaimsIdentity[])

Signs the user into the system.

Declaration
public void SignIn(AuthenticationProperties properties, params ClaimsIdentity[] identities)
Parameters
Type Name Description
Microsoft.Owin.Security.AuthenticationProperties properties

Contains additional properties the middleware are expected to persist along with the claims. These values will be returned as the AuthenticateResult.properties collection when AuthenticateAsync is called on subsequent requests.

System.Security.Claims.ClaimsIdentity[] identities

Contains additional properties the middleware are expected to persist along with the claims. These values will be returned as the AuthenticateResult.properties collection when AuthenticateAsync is called on subsequent requests..

ValidateUser(String, String)

Validates the identity.

Declaration
public virtual bool ValidateUser(string userName, string password)
Parameters
Type Name Description
System.String userName

The username.

System.String password

The password.

Returns
Type Description
System.Boolean

True if the user was validated

Implements