AppServer Connect Procedure

Top  Previous  Next  

You may wish to use your own business logic to validate user access to your system. This may be because your users' passwords are stored in your application database, or you may with to use the server's OS validation. This may be implemented as follows:

 

Start by defining a connect procedure in the AppServer agent's "Advanced Features":

 

For Progress Versions up to 10.x

 

 clip631

 

From OpenEdge 11

clip741

 

 

 

The procedure must then be placed somewhere within the PROPATH of your AppServer in order to be found.

 

Such a connect procedure will always be passed three character input parameters by Progress...

1.User ID
2.Entered password
3.AppServer information

 

Your connect procedure should be of the form

 

DEFINE INPUT PARAMETER ipcUserName AS CHARACTER NO-UNDO.

DEFINE INPUT PARAMETER ipcPassword AS CHARACTER NO-UNDO.

DEFINE INPUT PARAMETER ipcASInfo   AS CHARACTER NO-UNDO.

 

DEFINE VARIABLE lUserValidated AS LOGICAL NO-UNDO.

 

 

/* User Validation Logic is Defined Here */

ASSIGN lUserValidated = TRUE.

 

/*

ASSIGN lUserValidated

    = CAN-FIND( FIRST UserProfile

                WHERE UserProfile.UserName  = ipcUserName

                  AND UserProfile.EncPassWd = ENCODE( ipcPassword ) ).

*/

 

 

IF lUserValidated

THEN SETUSERID( ipcUserName, ipcPassword ).

ELSE RETURN ERROR.

 

 

If you wish to refuse a connection, use the Progress statement RETURN ERROR.

 

If using DataPA in the Enterprise model, and you require content to be refreshed by the DataPA Enterprise Service, you can set the credentials to be used by the service when connecting to the AppServer to perform the refresh, using the Data Access tab of the Manage Server window.

 


Copyright © 2003-2017 DataPA Limited, all rights reserved. DataPA OpenAnalytics 6.0