Authenticate User server behavior

This server behavior authenticates a user against a specified table in the database, and redirects to a specified location based on a successful or unsuccessful user lookup.

It specifies the columns in the user table that are to be compared against, and the corresponding form elements or other data source used to submit that data for authentication.

As well, if authentication is successful, it allows you to define session variables that can maintain any data specific to that user based on the information in their user record, allowing you to use that information during their visit, and also determine what parts of the site they have access to in conjunction with the Access Rules Manager.



Event: Specify the page event or trigger used to authenticate the login information against the user table in the database:
  • Trigger: Available triggers are:
    • any form post
    • before page load
    • current page submit
    • a selected button on the page
Database: The following criteria is necessary to properly configure your database information for use with this server behavior:
  • Connection: Selects the database connection used to connect to the database for your application. Select from a list of available connections defined prior, or click the Define button to configure a database connection.
  • Table: Selects the table within the chosen database that contains the data used to authenticate the user.
Redirect: Sets the actions that take place based on the authentication sequence.
  • Pass original querystring: If a query is currently maintained in your session from prior to authentication, checking this box will pass that querystring on to the redirect page.
  • Go to previous URL: When checked, successful authentication attempts are redirected to the last page viewed prior to attempting to login.
  • If login succeeds, go to: The redirect location for a successful login attempt. You may use site relative locations (i.e. ../../ ) to specify a file location or a full http:// address to redirect to another site.
  • If login fails, go to: The redirect location for a failed login attempt. You may use site relative locations (i.e. ../../ ) to specify a file location or a full http:// address to redirect to another site.
 

Map the form elements or other login data source to be authenticated to the fields database column that contains those values in the user table.
  • Column: The database column being checked for authentication of a given user profile value.
  • Value: Sets the source of the data to be authenticated for the selected column. Typically, this will be a form element, but you may also use server-side code to define the information to be authenticated.

 

Define the session variables that are maintained for comparison to rules (see Access Rules Manager for more info) to determine which pages the authenticated user has access to and does not. At a high level, the UserID is sufficient to maintain login, but you may wish to define other variables to maintain user information that might be important during the website experience as an authenticated user, or to determine different levels of access.
  • Column: Sets the database column containing the user info for the session variable being defined.
  • Session name: Specifies the name of the session variable to be maintained upon authentication for the selected database column.