Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To use this mechanism, you must bind CGI or RPG Smart Page program to the service program called PUIATAUTH.  This service program should not be copied from library PROFOUNDUI into the RPGsp or CGI object library. The RPGsp or CGI program should add the PROFOUNDUI library (or other Profound UI installation library) to the list to locate the service program.

Service program PUIATAUTH contains two procedures: Authenticate() and IsAuthorized() with the following prototypes:

Code Block

D Authenticate    PR           128A   Varying    
D  Error                       256A   Varying Options(*VarSize)   

D IsAuthorized    PR              N                       
D  User                        128A   Const Varying Options(*VarSize)  
D  Item                          9P 0 Const                   
D  Error                       256A   Varying Options(*VarSize)  

...

Authenticate() and IsAuthorized() both return an error using a by reference parameter to see what went wrong if the user is not authorized.

In addition, Atrium will pass a parameter called AT_AUTH on the query string to the program. This parameter is used by Authenticate() and must be passed along as a hidden field or a query string parameter as the user navigates between various parts of the application.

Below is an example of setting up the hidden field in RPGsp:

...

Credentials are passed using Atrium's normal sign-on method, which under the covers is the browser's "BASIC Authentication" scheme.  This means that the credentials will be automatically sent by the browser to all Atrium tabs or Windows until the browser is closed.  (Closing a tab or window does not reset the login information, you must either close the browser completely, or use Atrium's "Exit" button to log out.)