Class wwWebLogin

The wwWebLogin control provides both a visual login control as well as the ability to authenticate users directly against a FoxPro table using the wwUserSecurity class.

This class can act completely independently and provide the UI as well as performing the actual authentication. When a user logs in the control authenticates against the specified User class and sets LoggedIn and IsAdmin properties. It also writes a couple of Session variables. On subsequent requests the class is not accessed again and the two values are merely retrieved from the Session object and if available are used for the authentication ticket.

For more info see How the wwWebLogin Control works

Custom
  wwWebControl
    wwWebLogin

Remarks

This control requires Session state to work. This means you need to set the Page's EnableSessionState property to .T. Make sure this is done or code might fail or worse authentication will not work. By association this means that HTTP Cookies must be enabled.

Sets two Session Vars: WebLogin and WebLoginAdmin. The name of the Var is configurable via the LoginSessionVar property.

Class Members

MemberDescription

AfterLogIn

Event fired after a user has successfully logged in through the Web UI interface.

AfterLogOut

Event fired after a user has successfully logged out through the Web UI interface.

Login

This is the method that performs authentication for the username and password passed via the form variables. The method by default uses a wwUserSecurity derived class to authenticate user and set the LoggedIn and IsAdmin properties.

o.Login(lcUserName, lcPassword)

LogOut

This method is used to logout a user. It basically kills the Session vars set and resets the LoggedIn and IsAdmin properties.

o.LogOut()

CellPadding

Cell padding for the login table.

Center

Determines whether the control is centered

CssClass

The Css Class applied against the table. The default is LoginDisplay.

ErrorMessage

Error Message displayed in the Login Dialog. The Error Message is displayed at the top of the login control.

IsAdmin

Determines whether the user is an admin user (based on wwUserSecurity::oUser::Admin)

LoggedIn

Determines whether the user is logged in. This property

LoginButtonText

The text for the Login button.

LoginSessionVar

The name of the Session Variable that is set when a user is authenticated. Once set the control retrieves Login information by looking at this Session Varaible and to set the LoggedIn property. In addition another var is set which appends Admin to this value to retrieve the IsAdmin property.

Password

The password to be used. Generally you won't set this, but if for whatever reason you need to pre-seed this value you can.

PasswordLabel

The label used before the password field.

RenderMode

Determines how the control renders.

TextBoxWidth

The width of the TextBox controls on the Login form.

TitleClass

The CSS class for the header title text.

TitleText

The title text to display at the top of the login dialog.

UserMessage

Message displayed underneath the login button. Can be used for informational messages or other markup.

UserNameLabel

The label for the username field.

UserSecurityClass

The class used to verify authentication. If not specified the UserSecurity class of the Process class is used.

See also:

How the wwWebLogin Control works

© West Wind Technologies, 1996-2019 • Updated: 09/26/13
Comment or report problem with topic