C# Class Zetbox.Client.ASPNET.ZetboxMembershipProvider

Inheritance: WebMatrix.WebData.ExtendedMembershipProvider
显示文件 Open project: daszat/zetbox

Public Methods

Method Description
ChangePassword ( string username, string oldPassword, string newPassword ) : bool
ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool
ConfirmAccount ( string accountConfirmationToken ) : bool
ConfirmAccount ( string userName, string accountConfirmationToken ) : bool
CreateAccount ( string userName, string password, bool requireConfirmationToken ) : string

creates a local account, that is a password associated with a user

CreateOrUpdateOAuthAccount ( string provider, string providerUserId, string userName ) : void

creates a user with a profile and a OpenID account, no local account (a account with a password)

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

A user has a user profile and a local account

CreateUserAndAccount ( string userName, string password, bool requireConfirmation, object>.IDictionary values ) : string

A user has a user profile and a local account

DeleteAccount ( string userName ) : bool
DeleteOAuthAccount ( string provider, string providerUserId ) : void
DeleteOAuthToken ( string token ) : void
DeleteUser ( string username, bool deleteAllRelatedData ) : 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
GeneratePasswordResetToken ( string userName, int tokenExpirationInMinutesFromNow ) : string
GetAccountsForUser ( string userName ) : ICollection
GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
GetCreateDate ( string userName ) : System.DateTime
GetLastPasswordFailureDate ( string userName ) : System.DateTime
GetNumberOfUsersOnline ( ) : int
GetOAuthTokenSecret ( string token ) : string
GetPassword ( string username, string answer ) : string
GetPasswordChangedDate ( string userName ) : System.DateTime
GetPasswordFailuresSinceLastSuccess ( string userName ) : int
GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser
GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser
GetUserIdFromOAuth ( string provider, string providerUserId ) : int
GetUserIdFromPasswordResetToken ( string token ) : int
GetUserNameByEmail ( string email ) : string
GetUserNameFromId ( int userId ) : string
HasLocalAccount ( int userId ) : bool
IsConfirmed ( string userName ) : bool
ReplaceOAuthRequestTokenWithAccessToken ( string requestToken, string accessToken, string accessTokenSecret ) : void
ResetPassword ( string username, string answer ) : string
ResetPasswordWithToken ( string token, string newPassword ) : bool
StoreOAuthRequestToken ( string requestToken, string requestTokenSecret ) : void
UnlockUser ( string userName ) : bool
UpdateUser ( System user ) : void
ValidateUser ( string username, string password ) : bool

Private Methods

Method Description
GetContext ( ) : IZetboxContext
GetUser ( IZetboxContext ctx, int userid ) : Identity
GetUser ( IZetboxContext ctx, string username ) : Identity
GetUser ( IZetboxContext ctx, string provider, string providerUserId ) : Identity
ToMembershipUser ( Identity usr ) : System.Web.Security.MembershipUser

Method Details

ChangePassword() public method

public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string
oldPassword string
newPassword string
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

ConfirmAccount() public method

public ConfirmAccount ( string accountConfirmationToken ) : bool
accountConfirmationToken string
return bool

ConfirmAccount() public method

public ConfirmAccount ( string userName, string accountConfirmationToken ) : bool
userName string
accountConfirmationToken string
return bool

CreateAccount() public method

creates a local account, that is a password associated with a user
public CreateAccount ( string userName, string password, bool requireConfirmationToken ) : string
userName string
password string
requireConfirmationToken bool
return string

CreateOrUpdateOAuthAccount() public method

creates a user with a profile and a OpenID account, no local account (a account with a password)
public CreateOrUpdateOAuthAccount ( string provider, string providerUserId, string userName ) : void
provider string
providerUserId string
userName string
return void

CreateUser() public method

A user has a user profile and a local account
public CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, System &status ) : System.Web.Security.MembershipUser
username string
password string
email string
passwordQuestion string
passwordAnswer string
isApproved bool
providerUserKey object
status System
return System.Web.Security.MembershipUser

CreateUserAndAccount() public method

A user has a user profile and a local account
public CreateUserAndAccount ( string userName, string password, bool requireConfirmation, object>.IDictionary values ) : string
userName string
password string
requireConfirmation bool
values object>.IDictionary
return string

DeleteAccount() public method

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

DeleteOAuthAccount() public method

public DeleteOAuthAccount ( string provider, string providerUserId ) : void
provider string
providerUserId string
return void

DeleteOAuthToken() public method

public DeleteOAuthToken ( string token ) : void
token string
return void

DeleteUser() public method

public DeleteUser ( string username, bool deleteAllRelatedData ) : bool
username string
deleteAllRelatedData bool
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

GeneratePasswordResetToken() public method

public GeneratePasswordResetToken ( string userName, int tokenExpirationInMinutesFromNow ) : string
userName string
tokenExpirationInMinutesFromNow int
return string

GetAccountsForUser() public method

public GetAccountsForUser ( string userName ) : ICollection
userName string
return ICollection

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

GetCreateDate() public method

public GetCreateDate ( string userName ) : System.DateTime
userName string
return System.DateTime

GetLastPasswordFailureDate() public method

public GetLastPasswordFailureDate ( string userName ) : System.DateTime
userName string
return System.DateTime

GetNumberOfUsersOnline() public method

public GetNumberOfUsersOnline ( ) : int
return int

GetOAuthTokenSecret() public method

public GetOAuthTokenSecret ( string token ) : string
token string
return string

GetPassword() public method

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

GetPasswordChangedDate() public method

public GetPasswordChangedDate ( string userName ) : System.DateTime
userName string
return System.DateTime

GetPasswordFailuresSinceLastSuccess() public method

public GetPasswordFailuresSinceLastSuccess ( string userName ) : int
userName string
return int

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
userIsOnline bool
return System.Web.Security.MembershipUser

GetUserIdFromOAuth() public method

public GetUserIdFromOAuth ( string provider, string providerUserId ) : int
provider string
providerUserId string
return int

GetUserIdFromPasswordResetToken() public method

public GetUserIdFromPasswordResetToken ( string token ) : int
token string
return int

GetUserNameByEmail() public method

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

GetUserNameFromId() public method

public GetUserNameFromId ( int userId ) : string
userId int
return string

HasLocalAccount() public method

public HasLocalAccount ( int userId ) : bool
userId int
return bool

IsConfirmed() public method

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

ReplaceOAuthRequestTokenWithAccessToken() public method

public ReplaceOAuthRequestTokenWithAccessToken ( string requestToken, string accessToken, string accessTokenSecret ) : void
requestToken string
accessToken string
accessTokenSecret string
return void

ResetPassword() public method

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

ResetPasswordWithToken() public method

public ResetPasswordWithToken ( string token, string newPassword ) : bool
token string
newPassword string
return bool

StoreOAuthRequestToken() public method

public StoreOAuthRequestToken ( string requestToken, string requestTokenSecret ) : void
requestToken string
requestTokenSecret string
return void

UnlockUser() public method

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

UpdateUser() public method

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

ValidateUser() public method

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