C# Class NauckIT.PostgreSQLProvider.PgMembershipProvider

Inheritance: System.Web.Security.MembershipProvider
Exibir arquivo Open project: dnauck/AspSQLProvider

Public Methods

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

MembershipProvider.ChangePassword

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

MembershipProvider.ChangePasswordQuestionAndAnswer

CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : MembershipUser

MembershipProvider.CreateUser

DeleteUser ( string username, bool deleteAllRelatedData ) : bool

MembershipProvider.DeleteUser

FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : MembershipUserCollection

MembershipProvider.FindUsersByEmail

FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : MembershipUserCollection

MembershipProvider.FindUsersByName

GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : MembershipUserCollection

MembershipProvider.GetAllUsers

GetNumberOfUsersOnline ( ) : int

MembershipProvider.GetNumberOfUsersOnline

GetPassword ( string username, string answer ) : string

MembershipProvider.GetPassword

GetUser ( object providerUserKey, bool userIsOnline ) : MembershipUser

MembershipProvider.GetUser

GetUser ( string username, bool userIsOnline ) : MembershipUser

MembershipProvider.GetUser

GetUserNameByEmail ( string email ) : string

MembershipProvider.GetUserNameByEmail

Initialize ( string name, NameValueCollection config ) : void

System.Configuration.Provider.ProviderBase.Initialize Method.

ResetPassword ( string username, string answer ) : string

MembershipProvider.ResetPassword

UnlockUser ( string userName ) : bool

MembershipProvider.UnlockUser

UpdateUser ( MembershipUser user ) : void

MembershipProvider.UpdateUser

ValidateUser ( string username, string password ) : bool

MembershipProvider.ValidateUser

Private Methods

Method Description
CheckPassword ( string password, string dbpassword ) : bool

Compares password values based on the MembershipPasswordFormat.

EncodePassword ( string password ) : string

Encrypts, Hashes, or leaves the password clear based on the PasswordFormat.

GetConfigValue ( string configValue, string defaultValue ) : string

A helper function to retrieve config values from the configuration file.

GetConnectionString ( string connectionStringName ) : string

A helper function to retrieve the connecion string from the configuration file

GetUserFromReader ( NpgsqlDataReader reader ) : MembershipUser

A helper function that takes the current row from the NpgsqlDataReader and hydrates a MembershipUser from the values. Called by the MembershipUser.GetUser implementation.

HexToByte ( string hexString ) : byte[]

Converts a hexadecimal string to a byte array. Used to convert encryption key values from the configuration.

UnEncodePassword ( string encodedPassword ) : string

Decrypts or leaves the password clear based on the PasswordFormat.

UpdateFailureCount ( string username, FailureType failType ) : void

A helper method that performs the checks and updates associated with password failure tracking.

Method Details

ChangePassword() public method

MembershipProvider.ChangePassword
public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string
oldPassword string
newPassword string
return bool

ChangePasswordQuestionAndAnswer() public method

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

CreateUser() public method

MembershipProvider.CreateUser
public CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : MembershipUser
username string
password string
email string
passwordQuestion string
passwordAnswer string
isApproved bool
providerUserKey object
status MembershipCreateStatus
return MembershipUser

DeleteUser() public method

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

FindUsersByEmail() public method

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

FindUsersByName() public method

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

GetAllUsers() public method

MembershipProvider.GetAllUsers
public GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : MembershipUserCollection
pageIndex int
pageSize int
totalRecords int
return MembershipUserCollection

GetNumberOfUsersOnline() public method

MembershipProvider.GetNumberOfUsersOnline
public GetNumberOfUsersOnline ( ) : int
return int

GetPassword() public method

MembershipProvider.GetPassword
public GetPassword ( string username, string answer ) : string
username string
answer string
return string

GetUser() public method

MembershipProvider.GetUser
public GetUser ( object providerUserKey, bool userIsOnline ) : MembershipUser
providerUserKey object
userIsOnline bool
return MembershipUser

GetUser() public method

MembershipProvider.GetUser
public GetUser ( string username, bool userIsOnline ) : MembershipUser
username string
userIsOnline bool
return MembershipUser

GetUserNameByEmail() public method

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

Initialize() public method

System.Configuration.Provider.ProviderBase.Initialize Method.
public Initialize ( string name, NameValueCollection config ) : void
name string
config NameValueCollection
return void

ResetPassword() public method

MembershipProvider.ResetPassword
public ResetPassword ( string username, string answer ) : string
username string
answer string
return string

UnlockUser() public method

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

UpdateUser() public method

MembershipProvider.UpdateUser
public UpdateUser ( MembershipUser user ) : void
user MembershipUser
return void

ValidateUser() public method

MembershipProvider.ValidateUser
public ValidateUser ( string username, string password ) : bool
username string
password string
return bool