Class CustomerContactRegistrar

Registrar for customer contact principal

Inheritance
System.Object
CustomerContactRegistrar
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: 10.8.0
Syntax
public class CustomerContactRegistrar : IRegistrar

Constructors

CustomerContactRegistrar()

Initializes a new instance of the CustomerContactRegistrar class.

Declaration
public CustomerContactRegistrar()

CustomerContactRegistrar(MapUserKey)

Initializes a new instance of the CustomerContactRegistrar class.

Declaration
public CustomerContactRegistrar(MapUserKey mapUserKey)
Parameters
Type Name Description
MapUserKey mapUserKey

The map user key.

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