C# 클래스 Microsoft.WindowsAzure.Samples.Storage.Providers.TableStorageMembershipProvider

상속: System.Web.Security.MembershipProvider
파일 보기 프로젝트 열기: WindowsAzure-Toolkits/wa-toolkit-wp-nugets

공개 메소드들

메소드 설명
ChangePassword ( string username, string oldPassword, string newPassword ) : bool

Changes a users password. We don't use retries in this highly security-related function. All errors are exposed to the user of this function.

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

Change the password answer for a user.

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

Creates a new user and stores it in the membership table. We do not use retry policies in this highly security-related function. All error conditions are directly exposed to the user.

DeleteUser ( string username, bool deleteAllRelatedData ) : bool

Deletes the user from the membership table. This implementation ignores the deleteAllRelatedData argument

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

Find users by their names. The usernameToMatch must be the complete username like frank or can contain a '%' character at the end. A '%' character at the end implies that arbitrary characters can follow. Supporting additional searches right now would be very expensive because the filtering would have to be done on the client side; i.e., all users would have to be retrieved in order to do the filtering. IMPORTANT: because of this decision, user names must not contain a % character when using this function.

GeneratePassword ( ) : string
GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection

Retrieves a collection of all the users.

GetNumberOfUsersOnline ( ) : int

Get the number of users that are currently online

GetPassword ( string username, string answer ) : string

Gets the password of a user given the provided password answer

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

Get a user based on the username parameter. If the userIsOnline parameter is set the lastActivity flag of the user is changed in the data store

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

Retrieves a user based on his/her username. The userIsOnline parameter determines whether to update the lastActivityDate of the user in the data store

GetUserNameByEmail ( string email ) : string

Retrieves a username based on a matching email.

Initialize ( string name, NameValueCollection config ) : void

Initializes the membership provider. This is the only function that cannot be accessed in parallel by multiple applications. The function reads the properties of the provider specified in the Web.config file and stores them in member variables.

ResetPassword ( string username, string answer ) : string

Reset the password of a user. No retry policies are used in this function.

UnlockUser ( string userName ) : bool

Unlock a user

ValidateUser ( string username, string password ) : bool

Returns true if the username and password match an exsisting user. This implementation does not update a user's login time and does not raise corresponding Web events

비공개 메소드들

메소드 설명
CheckPassword ( DataServiceContext svc, string username, string password, bool updateLastLoginActivityDate, bool failIfNotApproved, MembershipRow &member ) : bool
CheckPassword ( string username, string password, bool updateLastLoginActivityDate, bool failIfNotApproved ) : bool
CheckPassword ( string username, string password, bool updateLastLoginActivityDate, bool failIfNotApproved, MembershipRow &member ) : bool
CreateDataServiceContext ( ) : Microsoft.WindowsAzure.StorageClient.TableServiceContext
EncodePassword ( string pass, int passwordFormat, string salt ) : string
EvaluatePasswordRequirements ( string password ) : bool
FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
GenerateSalt ( ) : string
GetUserFromTable ( DataServiceContext svc, string username ) : MembershipRow
IsUniqueEmail ( string email ) : bool
IsUniqueEmail ( string email, MembershipRow &member ) : bool
IsUniqueUserName ( string userName ) : bool
PasswordAttemptWindowAsTimeSpan ( ) : TimeSpan
ProcessGetUserQuery ( TableServiceContext svc, IQueryable query, bool updateLastActivityDate ) : MembershipUser
UnEncodePassword ( string pass, int passwordFormat ) : string
UpdateUser ( MembershipUser updatedUser ) : void

메소드 상세

ChangePassword() 공개 메소드

Changes a users password. We don't use retries in this highly security-related function. All errors are exposed to the user of this function.
public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string
oldPassword string
newPassword string
리턴 bool

ChangePasswordQuestionAndAnswer() 공개 메소드

Change the password answer for a user.
public ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool
username string
password string
newPasswordQuestion string
newPasswordAnswer string
리턴 bool

CreateUser() 공개 메소드

Creates a new user and stores it in the membership table. We do not use retry policies in this highly security-related function. All error conditions are directly exposed to the user.
public CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser
username string
password string
email string
passwordQuestion string
passwordAnswer string
isApproved bool
providerUserKey object
status MembershipCreateStatus
리턴 System.Web.Security.MembershipUser

DeleteUser() 공개 메소드

Deletes the user from the membership table. This implementation ignores the deleteAllRelatedData argument
public DeleteUser ( string username, bool deleteAllRelatedData ) : bool
username string
deleteAllRelatedData bool
리턴 bool

FindUsersByName() 공개 메소드

Find users by their names. The usernameToMatch must be the complete username like frank or can contain a '%' character at the end. A '%' character at the end implies that arbitrary characters can follow. Supporting additional searches right now would be very expensive because the filtering would have to be done on the client side; i.e., all users would have to be retrieved in order to do the filtering. IMPORTANT: because of this decision, user names must not contain a % character when using this function.
public FindUsersByName ( string usernameToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
usernameToMatch string
pageIndex int
pageSize int
totalRecords int
리턴 System.Web.Security.MembershipUserCollection

GeneratePassword() 공개 메소드

public GeneratePassword ( ) : string
리턴 string

GetAllUsers() 공개 메소드

Retrieves a collection of all the users.
public GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
pageIndex int
pageSize int
totalRecords int
리턴 System.Web.Security.MembershipUserCollection

GetNumberOfUsersOnline() 공개 메소드

Get the number of users that are currently online
public GetNumberOfUsersOnline ( ) : int
리턴 int

GetPassword() 공개 메소드

Gets the password of a user given the provided password answer
public GetPassword ( string username, string answer ) : string
username string
answer string
리턴 string

GetUser() 공개 메소드

Get a user based on the username parameter. If the userIsOnline parameter is set the lastActivity flag of the user is changed in the data store
public GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser
providerUserKey object
userIsOnline bool
리턴 System.Web.Security.MembershipUser

GetUser() 공개 메소드

Retrieves a user based on his/her username. The userIsOnline parameter determines whether to update the lastActivityDate of the user in the data store
public GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser
username string
userIsOnline bool
리턴 System.Web.Security.MembershipUser

GetUserNameByEmail() 공개 메소드

Retrieves a username based on a matching email.
public GetUserNameByEmail ( string email ) : string
email string
리턴 string

Initialize() 공개 메소드

Initializes the membership provider. This is the only function that cannot be accessed in parallel by multiple applications. The function reads the properties of the provider specified in the Web.config file and stores them in member variables.
public Initialize ( string name, NameValueCollection config ) : void
name string
config System.Collections.Specialized.NameValueCollection
리턴 void

ResetPassword() 공개 메소드

Reset the password of a user. No retry policies are used in this function.
public ResetPassword ( string username, string answer ) : string
username string
answer string
리턴 string

UnlockUser() 공개 메소드

Unlock a user
public UnlockUser ( string userName ) : bool
userName string
리턴 bool

ValidateUser() 공개 메소드

Returns true if the username and password match an exsisting user. This implementation does not update a user's login time and does not raise corresponding Web events
public ValidateUser ( string username, string password ) : bool
username string
password string
리턴 bool