4D v14.3

WEB Validate digest

Home

 
4D v14.3
WEB Validate digest

WEB Validate digest 


 

WEB Validate digest ( userName ; password ) -> Function result 
Parameter Type   Description
userName  Text in User name
password  Text in User password
Function result  Boolean in True=Authentication OK, False=Authentication failed

The WEB Validate digest command checks the validity of the identifying information (name and password) provided by a user connecting to the Web server. This command must be used in the On Web Authentication Database Method in the context of Web authentication in Digest mode (see the Connection Security section).

In the userName and password parameters, pass the identifying information of the user stored locally. The command uses this information to generate a value that it compares with the information sent by the Web browser.

If the values are the same, the command returns True. Otherwise, it returns False.

You can use this mechanism to manage and maintain your own secure access system to the Web server by programming. Note that Digest validation cannot be used jointly with 4D passwords.

Note: If the browser does not support Digest authentication, an error is returned (authentication error).

Example  

Example using On Web Authentication Database Method in Digest mode:

  ` On Web Authentication Database Method
 C_TEXT($1;$2;$5;$6;$3;$4)
 C_TEXT($user)
 C_BOOLEAN($0)
 $0:=False
 $user:=$5
  `For security reasons, refuse names containing @
 If(WithWildcard($user))
    $0:=False
  `The WithWildcard method is described in the "On Web Authentication Database Method" section
 Else
    QUERY([WebUsers];[WebUsers]User=$user)
    If(OK=1)
       $0:=WEB Validate digest($user;[WebUsers]password)
    Else
       $0:=False `User does not exist
    End if
 End if

 
PROPERTIES 

Product: 4D
Theme: Web Server
Number: 946

 
HISTORY 

Created: 4D v11 SQL
Renamed: 4D v13

 
SEE ALSO 

On Web Authentication Database Method
Validate password

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : Validate Digest Web Password ( 4D v11 SQL Release 6)
Parent of : WEB Validate digest ( 4D v13.5)