Component index
Section index

Component weblogin


Search

Type

Function

Summary

Control the access to a web service using a user/password

Description

This is a general framework to handle authentication. It does not have any look. It simply provides the logic to handle authentication.

void bottom ()
void exec (const char *user, const char *passw)
void setup (W_SSTRING &user, W_SSTRING &passw)
void top ()
bool validate (const char *user, const char *passw)

Prototypes

void weblogin (W_SSTRING &user, W_SSTRING &passw)

Functags

void bottom () Optional

Called to draw various HTML statements at the bottom of the form

void exec (const char *user, const char *passw) Mandatory

Called when the user is authenticate to perform the application task

You put the application there.

void setup (W_SSTRING &user, W_SSTRING &passw) Mandatory

Called to perform the layout of the form

The component is using the form component internally. The HTML form is already defined. You simply concentrate on the HTML statements inside the form. You call field_user() and field_pass() to position the two input field.

void top () Optional

Called to put arbitrary HTML statements before the form

bool validate (const char *user, const char *passw) Mandatory

Is called to check the user/password pair

Return true is the user/password pair are valid. The function does not produce any output

Fhelpers

void field_pass ()

Position the password input field

void field_user ()

Setup the input field to grab the user id

You create a web layout and use this function to position the field.