C# Class CAESDO.Recruitment.Providers.CAESDOMembershipProvider

Summary description for FRACMembershipProvider
Inheritance: System.Web.Security.MembershipProvider
Show file Open project: ucdavis/Recruitments

Public Methods

Method Description
ChangePassword ( string username, string oldPassword, string newPassword ) : bool

Changes a users password after checking that they know their old password

ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool
CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser

Creates a user from the given parameters and settings in the web.config (under the membership section)

DeleteUser ( string username, bool deleteAllRelatedData ) : bool
Equals ( object obj ) : bool
FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
GeneratePassword ( ) : string
GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
GetHashCode ( ) : int
GetNumberOfUsersOnline ( ) : int
GetPassword ( string username, string answer ) : string

Pulls the password out of the database if EnablePasswordRetrieval is set to true (not yet implemented).

GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser
GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser

GetUserNameByEmail ( string email ) : string
Initialize ( string name, System config ) : void
ResetPassword ( string username, string passwordAnswer ) : string

Resets a user's password if they have the correct answer to the passwordQuestion

ToString ( ) : string
UnlockUser ( string userName ) : bool
UpdateUser ( System.Web.Security.MembershipUser user ) : void
ValidateUser ( string username, string password ) : bool

Validates a user by making sure their username and password are correct in the system. Regardless of the web.config settings, the password information (salt, format) are taken from the database and then compared

Protected Methods

Method Description
DecryptPassword ( byte encodedPassword ) : byte[]
EncryptPassword ( byte password ) : byte[]
OnValidatingPassword ( System.Web.Security.ValidatePasswordEventArgs e ) : void

Private Methods

Method Description
CheckPassword ( string username, string password, int &status ) : bool

Checks the given password against the stored password for a user

EncodePassword ( string pass, int passwordFormat, string salt ) : string
GenerateSalt ( ) : string
GetPasswordWithFormat ( string username, int &passwordFormat, int &status, string &passwordSalt, bool &userIsApproved ) : string

Pulls out the password information for user identified by 'username', along with the password format, salt, and user approval information

UnEncodePassword ( string pass, int passwordFormat ) : string

Method Details

ChangePassword() public method

Changes a users password after checking that they know their old password
public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string Username
oldPassword string The old password in the system
newPassword string The desired new password
return bool

ChangePasswordQuestionAndAnswer() public method

public ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool
username string
password string
newPasswordQuestion string
newPasswordAnswer string
return bool

CreateUser() public method

Creates a user from the given parameters and settings in the web.config (under the membership section)
public CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser
username string Kerberos LoginID of the user who created the account (or string.empty)
password string Password -- complexity determined by web.config settings
email string Email entered by user
passwordQuestion string
passwordAnswer string
isApproved bool
providerUserKey object Not used since username is always unique, we can look up with UserID when necessary
status MembershipCreateStatus
return System.Web.Security.MembershipUser

DecryptPassword() protected method

protected DecryptPassword ( byte encodedPassword ) : byte[]
encodedPassword byte
return byte[]

DeleteUser() public method

public DeleteUser ( string username, bool deleteAllRelatedData ) : bool
username string
deleteAllRelatedData bool
return bool

EncryptPassword() protected method

protected EncryptPassword ( byte password ) : byte[]
password byte
return byte[]

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

FindUsersByEmail() public method

public FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
emailToMatch string
pageIndex int
pageSize int
totalRecords int
return System.Web.Security.MembershipUserCollection

FindUsersByName() public method

public FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
usernameToMatch string
pageIndex int
pageSize int
totalRecords int
return System.Web.Security.MembershipUserCollection

GeneratePassword() public method

public GeneratePassword ( ) : string
return string

GetAllUsers() public method

public GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
pageIndex int
pageSize int
totalRecords int
return System.Web.Security.MembershipUserCollection

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetNumberOfUsersOnline() public method

public GetNumberOfUsersOnline ( ) : int
return int

GetPassword() public method

Pulls the password out of the database if EnablePasswordRetrieval is set to true (not yet implemented).
NotSupportedException
public GetPassword ( string username, string answer ) : string
username string Username
answer string Answer to the users question
return string

GetUser() public method

public GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser
providerUserKey object
userIsOnline bool
return System.Web.Security.MembershipUser

GetUser() public method

public GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser
username string Email Address of the account
userIsOnline bool
return System.Web.Security.MembershipUser

GetUserNameByEmail() public method

public GetUserNameByEmail ( string email ) : string
email string
return string

Initialize() public method

public Initialize ( string name, System config ) : void
name string
config System
return void

OnValidatingPassword() protected method

protected OnValidatingPassword ( System.Web.Security.ValidatePasswordEventArgs e ) : void
e System.Web.Security.ValidatePasswordEventArgs
return void

ResetPassword() public method

Resets a user's password if they have the correct answer to the passwordQuestion
public ResetPassword ( string username, string passwordAnswer ) : string
username string Username
passwordAnswer string
return string

ToString() public method

public ToString ( ) : string
return string

UnlockUser() public method

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

UpdateUser() public method

public UpdateUser ( System.Web.Security.MembershipUser user ) : void
user System.Web.Security.MembershipUser
return void

ValidateUser() public method

Validates a user by making sure their username and password are correct in the system. Regardless of the web.config settings, the password information (salt, format) are taken from the database and then compared
public ValidateUser ( string username, string password ) : bool
username string Unique username
password string Password to be compared against database.
return bool