C# Класс EnterpriseWebLibrary.EnterpriseWebFramework.UserManagement.FormsAuthStatics

Statics related to forms authentication.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
SessionDuration System.TimeSpan

Private Properties

Свойство Тип Описание
GetFormsAuthTicket System.Web.Security.FormsAuthenticationTicket
GetUser EnterpriseWebLibrary.EnterpriseWebFramework.UserManagement.FormsAuthCapableUser
GetUser EnterpriseWebLibrary.EnterpriseWebFramework.UserManagement.FormsAuthCapableUser
GetUsers IEnumerable
Init void
SendPassword void
UpdateFormsAuthCookieIfNecessary void
addStatusMessageIfClockNotSynchronized void
clearFormsAuthCookie void
setCookie void
setFormsAuthCookie void
setFormsAuthCookieAndUser void
setUpClientSideLogicForLogIn void
verifyTestCookie string[]

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

Метод Описание
GetEmailAddressFormItem ( this emailAddress, FormItemLabel label, string errorMessage, ValidationList vl ) : FormItem

Gets an email address form item for use on log-in pages. The validation sets this data value to the post back value of the text box, if valid, or adds the specified error message to the form item.

GetLogInMethod ( Control etherealControlParent, DataValue emailAddress, DataValue password, string emailAddressErrorMessage, string passwordErrorMessage, ValidationList vl ) : Func

Sets up client-side logic for user log-in and returns a modification method that logs in a user. Do not call if the system does not implement the forms-authentication-capable user-management provider.

GetSpecifiedUserLogInMethod ( Control etherealControlParent, ValidationList vl ) : Action

Sets up client-side logic for user log-in and returns a modification method that logs in the specified user. Do not call if the system does not implement the forms-authentication-capable user-management provider. This method should be called in LoadData. The method returned should be called in an event handler.

LogOutUser ( ) : void

Do not call if the system does not implement the forms authentication capable user management provider.

ResetAndSendPassword ( int userId ) : void

Resets the password of the given user and sends a message with the new password to their email address. Do not call if the system does not implement the forms authentication capable user management provider.

ResetAndSendPassword ( string validatedEmailAddress, string emailAddressErrorMessage ) : void

Resets the password of the user with the specified email address and sends a message with the new password to their email address. Do not call if the system does not implement the forms authentication capable user management provider.

UserCredentialsAreCorrect ( string userEmailAddress, string providedPassword ) : bool

PRE: SystemProvider is a FormsAuthCapableUserManagementProvider. Returns true if the given credentials correspond to a user and are correct.

ValidatePassword ( Validator validator, DataValue password, DataValue passwordAgain ) : void

Ensures that the specified data values contain identical, valid password values.

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

Метод Описание
GetFormsAuthTicket ( System.Web.HttpCookie cookie ) : System.Web.Security.FormsAuthenticationTicket
GetUser ( int userId, bool ensureUserExists ) : EnterpriseWebLibrary.EnterpriseWebFramework.UserManagement.FormsAuthCapableUser
GetUser ( string emailAddress ) : EnterpriseWebLibrary.EnterpriseWebFramework.UserManagement.FormsAuthCapableUser
GetUsers ( ) : IEnumerable
Init ( Func providerGetter ) : void
SendPassword ( string emailAddress, string password ) : void
UpdateFormsAuthCookieIfNecessary ( ) : void
addStatusMessageIfClockNotSynchronized ( DataValue utcOffset ) : void
clearFormsAuthCookie ( ) : void
setCookie ( string name, string value ) : void
setFormsAuthCookie ( System.Web.Security.FormsAuthenticationTicket ticket ) : void
setFormsAuthCookieAndUser ( EnterpriseWebLibrary.EnterpriseWebFramework.UserManagement.FormsAuthCapableUser user ) : void
setUpClientSideLogicForLogIn ( Control etherealControlParent, DataValue utcOffset, ValidationList vl ) : void
verifyTestCookie ( ) : string[]

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

GetEmailAddressFormItem() публичный статический Метод

Gets an email address form item for use on log-in pages. The validation sets this data value to the post back value of the text box, if valid, or adds the specified error message to the form item.
public static GetEmailAddressFormItem ( this emailAddress, FormItemLabel label, string errorMessage, ValidationList vl ) : FormItem
emailAddress this
label FormItemLabel
errorMessage string
vl ValidationList
Результат FormItem

GetLogInMethod() публичный статический Метод

Sets up client-side logic for user log-in and returns a modification method that logs in a user. Do not call if the system does not implement the forms-authentication-capable user-management provider.
public static GetLogInMethod ( Control etherealControlParent, DataValue emailAddress, DataValue password, string emailAddressErrorMessage, string passwordErrorMessage, ValidationList vl ) : Func
etherealControlParent System.Web.UI.Control
emailAddress DataValue
password DataValue
emailAddressErrorMessage string
passwordErrorMessage string
vl ValidationList
Результат Func

GetSpecifiedUserLogInMethod() публичный статический Метод

Sets up client-side logic for user log-in and returns a modification method that logs in the specified user. Do not call if the system does not implement the forms-authentication-capable user-management provider. This method should be called in LoadData. The method returned should be called in an event handler.
public static GetSpecifiedUserLogInMethod ( Control etherealControlParent, ValidationList vl ) : Action
etherealControlParent System.Web.UI.Control
vl ValidationList
Результат Action

LogOutUser() публичный статический Метод

Do not call if the system does not implement the forms authentication capable user management provider.
public static LogOutUser ( ) : void
Результат void

ResetAndSendPassword() публичный статический Метод

Resets the password of the given user and sends a message with the new password to their email address. Do not call if the system does not implement the forms authentication capable user management provider.
public static ResetAndSendPassword ( int userId ) : void
userId int
Результат void

ResetAndSendPassword() публичный статический Метод

Resets the password of the user with the specified email address and sends a message with the new password to their email address. Do not call if the system does not implement the forms authentication capable user management provider.
public static ResetAndSendPassword ( string validatedEmailAddress, string emailAddressErrorMessage ) : void
validatedEmailAddress string
emailAddressErrorMessage string
Результат void

UserCredentialsAreCorrect() публичный статический Метод

PRE: SystemProvider is a FormsAuthCapableUserManagementProvider. Returns true if the given credentials correspond to a user and are correct.
public static UserCredentialsAreCorrect ( string userEmailAddress, string providedPassword ) : bool
userEmailAddress string
providedPassword string
Результат bool

ValidatePassword() публичный статический Метод

Ensures that the specified data values contain identical, valid password values.
public static ValidatePassword ( Validator validator, DataValue password, DataValue passwordAgain ) : void
validator Validator
password DataValue
passwordAgain DataValue
Результат void

Описание свойств

SessionDuration публичное статическое свойство

The idle time required for a session to be erased.
public static TimeSpan,System SessionDuration
Результат System.TimeSpan