C# Класс nonintanon.Security.SimpleMembershipProvider

Наследование: GuidExtendedMembershipProvider
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
CheckPassword bool
CheckTableExists bool
ConnectToDatabase IDatabase
CreateOAuthTokenTableIfNeeded void
CreateTablesIfNeeded void
CreateUserRow void
DeleteUserAndAccountInternal bool
GenerateToken string
GenerateToken string
GetHashedPassword string
GetPasswordFailuresSinceLastSuccess int
GetUserId System.Guid
SetPassword bool
ValidateUserTable void
VerifyInitialized void
VerifyUserNameHasConfirmedAccount System.Guid

Открытые методы

Метод Описание
ChangePassword ( string username, string oldPassword, string newPassword ) : bool
ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool
ConfirmAccount ( string accountConfirmationToken ) : bool

Sets the confirmed flag for the username if it is correct.

Inherited from ExtendedMembershipProvider ==> Simple Membership MUST be enabled to use this method. There is a tiny possibility where this method fails to work correctly. Two or more users could be assigned the same token but specified using different cases. A workaround for this would be to use the overload that accepts both the user name and confirmation token.

ConfirmAccount ( string userName, string accountConfirmationToken ) : bool

Sets the confirmed flag for the username if it is correct.

Inherited from ExtendedMembershipProvider ==> Simple Membership MUST be enabled to use this method

CreateAccount ( string userName, string password, bool requireConfirmationToken ) : string
CreateOrUpdateOAuthAccount ( string provider, string providerUserId, string userName ) : void
CreateUser ( string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, MembershipCreateStatus &status ) : System.Web.Security.MembershipUser
CreateUserAndAccount ( string userName, string password, bool requireConfirmation, object>.IDictionary values ) : string
DeleteAccount ( string userName ) : bool
DeleteOAuthAccount ( string provider, string providerUserId ) : void
DeleteOAuthToken ( string token ) : void

Deletes the OAuth token from the backing store from the database.

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
GetUserId ( string userName ) : System.Guid
GetUserIdFromOAuth ( string provider, string providerUserId ) : System.Guid
GetUserIdFromPasswordResetToken ( string token ) : System.Guid
GetUserNameByEmail ( string email ) : string
GetUserNameFromId ( System.Guid userId ) : string
HasLocalAccount ( System.Guid userId ) : bool

Determines whether there exists a local account (as opposed to OAuth account) with the specified userId.

Initialize ( string name, NameValueCollection config ) : void
IsConfirmed ( string userName ) : bool
ReplaceOAuthRequestTokenWithAccessToken ( string requestToken, string accessToken, string accessTokenSecret ) : void

Replaces the request token with access token and secret.

ResetPassword ( string username, string answer ) : string
ResetPasswordWithToken ( string token, string newPassword ) : bool
SimpleMembershipProvider ( ) : System
SimpleMembershipProvider ( MembershipProvider previousProvider ) : System
StoreOAuthRequestToken ( string requestToken, string requestTokenSecret ) : void
UnlockUser ( string userName ) : bool
UpdateUser ( System.Web.Security.MembershipUser user ) : void
ValidateUser ( string username, string password ) : bool

Приватные методы

Метод Описание
CheckPassword ( IDatabase db, System.Guid userId, string password ) : bool
CheckTableExists ( IDatabase db, string tableName ) : bool
ConnectToDatabase ( ) : IDatabase
CreateOAuthTokenTableIfNeeded ( IDatabase db ) : void
CreateTablesIfNeeded ( ) : void
CreateUserRow ( IDatabase db, string userName, object>.IDictionary values ) : void
DeleteUserAndAccountInternal ( string userName ) : bool
GenerateToken ( ) : string
GenerateToken ( RandomNumberGenerator generator ) : string
GetHashedPassword ( IDatabase db, System.Guid userId ) : string
GetPasswordFailuresSinceLastSuccess ( IDatabase db, System.Guid userId ) : int
GetUserId ( IDatabase db, string userTableName, string userNameColumn, string userIdColumn, string userName ) : System.Guid
SetPassword ( IDatabase db, System.Guid userId, string newPassword ) : bool
ValidateUserTable ( ) : void
VerifyInitialized ( ) : void
VerifyUserNameHasConfirmedAccount ( IDatabase db, string username, bool throwException ) : System.Guid

Описание методов

ChangePassword() публичный Метод

public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string
oldPassword string
newPassword string
Результат bool

ChangePasswordQuestionAndAnswer() публичный Метод

public ChangePasswordQuestionAndAnswer ( string username, string password, string newPasswordQuestion, string newPasswordAnswer ) : bool
username string
password string
newPasswordQuestion string
newPasswordAnswer string
Результат bool

ConfirmAccount() публичный Метод

Sets the confirmed flag for the username if it is correct.
Inherited from ExtendedMembershipProvider ==> Simple Membership MUST be enabled to use this method. There is a tiny possibility where this method fails to work correctly. Two or more users could be assigned the same token but specified using different cases. A workaround for this would be to use the overload that accepts both the user name and confirmation token.
public ConfirmAccount ( string accountConfirmationToken ) : bool
accountConfirmationToken string
Результат bool

ConfirmAccount() публичный Метод

Sets the confirmed flag for the username if it is correct.
Inherited from ExtendedMembershipProvider ==> Simple Membership MUST be enabled to use this method
public ConfirmAccount ( string userName, string accountConfirmationToken ) : bool
userName string
accountConfirmationToken string
Результат bool

CreateAccount() публичный Метод

public CreateAccount ( string userName, string password, bool requireConfirmationToken ) : string
userName string
password string
requireConfirmationToken bool
Результат string

CreateOrUpdateOAuthAccount() публичный Метод

public CreateOrUpdateOAuthAccount ( string provider, string providerUserId, string userName ) : void
provider string
providerUserId string
userName string
Результат void

CreateUser() публичный Метод

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

CreateUserAndAccount() публичный Метод

public CreateUserAndAccount ( string userName, string password, bool requireConfirmation, object>.IDictionary values ) : string
userName string
password string
requireConfirmation bool
values object>.IDictionary
Результат string

DeleteAccount() публичный Метод

public DeleteAccount ( string userName ) : bool
userName string
Результат bool

DeleteOAuthAccount() публичный Метод

public DeleteOAuthAccount ( string provider, string providerUserId ) : void
provider string
providerUserId string
Результат void

DeleteOAuthToken() публичный Метод

Deletes the OAuth token from the backing store from the database.
public DeleteOAuthToken ( string token ) : void
token string The token to be deleted.
Результат void

DeleteUser() публичный Метод

public DeleteUser ( string username, bool deleteAllRelatedData ) : bool
username string
deleteAllRelatedData bool
Результат bool

FindUsersByEmail() публичный Метод

public FindUsersByEmail ( string emailToMatch, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
emailToMatch string
pageIndex int
pageSize int
totalRecords int
Результат System.Web.Security.MembershipUserCollection

FindUsersByName() публичный Метод

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

GeneratePasswordResetToken() публичный Метод

public GeneratePasswordResetToken ( string userName, int tokenExpirationInMinutesFromNow ) : string
userName string
tokenExpirationInMinutesFromNow int
Результат string

GetAccountsForUser() публичный Метод

public GetAccountsForUser ( string userName ) : ICollection
userName string
Результат ICollection

GetAllUsers() публичный Метод

public GetAllUsers ( int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
pageIndex int
pageSize int
totalRecords int
Результат System.Web.Security.MembershipUserCollection

GetCreateDate() публичный Метод

public GetCreateDate ( string userName ) : System.DateTime
userName string
Результат System.DateTime

GetLastPasswordFailureDate() публичный Метод

public GetLastPasswordFailureDate ( string userName ) : System.DateTime
userName string
Результат System.DateTime

GetNumberOfUsersOnline() публичный Метод

public GetNumberOfUsersOnline ( ) : int
Результат int

GetOAuthTokenSecret() публичный Метод

public GetOAuthTokenSecret ( string token ) : string
token string
Результат string

GetPassword() публичный Метод

public GetPassword ( string username, string answer ) : string
username string
answer string
Результат string

GetPasswordChangedDate() публичный Метод

public GetPasswordChangedDate ( string userName ) : System.DateTime
userName string
Результат System.DateTime

GetPasswordFailuresSinceLastSuccess() публичный Метод

public GetPasswordFailuresSinceLastSuccess ( string userName ) : int
userName string
Результат int

GetUser() публичный Метод

public GetUser ( object providerUserKey, bool userIsOnline ) : System.Web.Security.MembershipUser
providerUserKey object
userIsOnline bool
Результат System.Web.Security.MembershipUser

GetUser() публичный Метод

public GetUser ( string username, bool userIsOnline ) : System.Web.Security.MembershipUser
username string
userIsOnline bool
Результат System.Web.Security.MembershipUser

GetUserId() публичный Метод

public GetUserId ( string userName ) : System.Guid
userName string
Результат System.Guid

GetUserIdFromOAuth() публичный Метод

public GetUserIdFromOAuth ( string provider, string providerUserId ) : System.Guid
provider string
providerUserId string
Результат System.Guid

GetUserIdFromPasswordResetToken() публичный Метод

public GetUserIdFromPasswordResetToken ( string token ) : System.Guid
token string
Результат System.Guid

GetUserNameByEmail() публичный Метод

public GetUserNameByEmail ( string email ) : string
email string
Результат string

GetUserNameFromId() публичный Метод

public GetUserNameFromId ( System.Guid userId ) : string
userId System.Guid
Результат string

HasLocalAccount() публичный Метод

Determines whether there exists a local account (as opposed to OAuth account) with the specified userId.
public HasLocalAccount ( System.Guid userId ) : bool
userId System.Guid The user id to check for local account.
Результат bool

Initialize() публичный Метод

public Initialize ( string name, NameValueCollection config ) : void
name string
config System.Collections.Specialized.NameValueCollection
Результат void

IsConfirmed() публичный Метод

public IsConfirmed ( string userName ) : bool
userName string
Результат bool

ReplaceOAuthRequestTokenWithAccessToken() публичный Метод

Replaces the request token with access token and secret.
public ReplaceOAuthRequestTokenWithAccessToken ( string requestToken, string accessToken, string accessTokenSecret ) : void
requestToken string The request token.
accessToken string The access token.
accessTokenSecret string The access token secret.
Результат void

ResetPassword() публичный Метод

public ResetPassword ( string username, string answer ) : string
username string
answer string
Результат string

ResetPasswordWithToken() публичный Метод

public ResetPasswordWithToken ( string token, string newPassword ) : bool
token string
newPassword string
Результат bool

SimpleMembershipProvider() публичный Метод

public SimpleMembershipProvider ( ) : System
Результат System

SimpleMembershipProvider() публичный Метод

public SimpleMembershipProvider ( MembershipProvider previousProvider ) : System
previousProvider System.Web.Security.MembershipProvider
Результат System

StoreOAuthRequestToken() публичный Метод

public StoreOAuthRequestToken ( string requestToken, string requestTokenSecret ) : void
requestToken string
requestTokenSecret string
Результат void

UnlockUser() публичный Метод

public UnlockUser ( string userName ) : bool
userName string
Результат bool

UpdateUser() публичный Метод

public UpdateUser ( System.Web.Security.MembershipUser user ) : void
user System.Web.Security.MembershipUser
Результат void

ValidateUser() публичный Метод

public ValidateUser ( string username, string password ) : bool
username string
password string
Результат bool