C# Class Contrive.Auth.UserService

Inheritance: IUserService
Exibir arquivo Open project: alanstevens/Contrive

Public Properties

Property Type Description
NewUser Func

Public Methods

Method Description
ChangePassword ( string userName, string oldPassword, string newPassword ) : bool
CreateUser ( string userName, string password, string emailAddress, string firstName = null, string lastName = null ) : UserCreateStatus
DeleteAccount ( string userName ) : bool
GetUserByEmailAddress ( string emailAddress ) : IUser
GetUserByUserName ( string userName ) : IUser
GetUsersForUserNames ( IEnumerable users ) : IEnumerable
UpdateUser ( IUser user ) : void
UserService ( IUserRepository userRepository, ICryptographer cryptographer, IUserServiceSettings settings ) : System
ValidateUser ( string userName, string password ) : IUser

Private Methods

Method Description
EncodePassword ( string password, string passwordSalt ) : string
IsValidPassword ( string password ) : bool
VerifyPassword ( IUser user, string password ) : bool
VerifyUser ( IUser user, string password ) : bool
VerifyUserExists ( string userName ) : IUser

Method Details

ChangePassword() public method

public ChangePassword ( string userName, string oldPassword, string newPassword ) : bool
userName string
oldPassword string
newPassword string
return bool

CreateUser() public method

public CreateUser ( string userName, string password, string emailAddress, string firstName = null, string lastName = null ) : UserCreateStatus
userName string
password string
emailAddress string
firstName string
lastName string
return UserCreateStatus

DeleteAccount() public method

public DeleteAccount ( string userName ) : bool
userName string
return bool

GetUserByEmailAddress() public method

public GetUserByEmailAddress ( string emailAddress ) : IUser
emailAddress string
return IUser

GetUserByUserName() public method

public GetUserByUserName ( string userName ) : IUser
userName string
return IUser

GetUsersForUserNames() public method

public GetUsersForUserNames ( IEnumerable users ) : IEnumerable
users IEnumerable
return IEnumerable

UpdateUser() public method

public UpdateUser ( IUser user ) : void
user IUser
return void

UserService() public method

public UserService ( IUserRepository userRepository, ICryptographer cryptographer, IUserServiceSettings settings ) : System
userRepository IUserRepository
cryptographer ICryptographer
settings IUserServiceSettings
return System

ValidateUser() public method

public ValidateUser ( string userName, string password ) : IUser
userName string
password string
return IUser

Property Details

NewUser public_oe static_oe property

This abstraction enables a consumer to return their own IUser implementation. This delegate can be populated at application startup using an IStartupTask or some other mean.
public static Func NewUser
return Func