12.2.2 Authenticating User System Variables

These are the variables described below:

System Variable

Description

Type

Len

Dec

*USER

Current IBM i User ID

A

10

 

*USER_AUDIT

Current Audit User Identity.
Refer to SET_SESSION_VALUE and Output Stamping Attributes.

A

256

 

*USER_AUTHENTICATED

Current authenticated user name.

A

256

 

*WEBUSER

Web Server/400 or Internet Connection Server for IBM i user profile

A

10

 

 

  

*USER

*USER represents the User ID with which the Visual LANSA application (x_run) was started. If running a function through LANSA SuperServer, *USER represents the User ID used to connect to the server. If running in a Web Environment, *USER stores the LANSA User ID. Mappings between the User ID used to logon to the web session and LANSA User ID's are created through the Web Administrator.

*USER_AUDIT

*USER_AUDIT represents the user that has been set by an executing application using the Built-In Function SET_SESSION_VALUE. It may be used where the current user does not give sufficient differentiations, such as in web jobs where all user jobs run under the default web user profiles.

*USER_AUTHENTICATED

*USER_AUTHENTICATED represents the User ID which has been used to log on to the operating system and which has been authenticated by the selected authentication protocol (such as Kerberos). If running a function through LANSA SuperServer, *USER_AUTHENTICATED represents the User ID used to connect to the server. The authenticated name is the fully qualified name which includes the User ID and the domain/workgroup/machine name. For example, JohnCitizen@mydomain.com.au, JohnCitizen@Johnspc.

In LANSA SuperServer mode, if the User ID is defined both as a local user and a domain user, the local user will be used for authentication.

In the web runtime environment, *USER_AUTHENTICATED represents the User ID used to log on to the web session.

Please refer to *WEBUSER for more details.

Examples:

Start Form As

John

 

Windows log in

MYDOMAIN\John

 

Connect As

John

 

Connect To

Windows (Logged in as MYDOMAIN\John on server)

 

 

USER USER_AUTHENTICATED
Local

John

John@MYDOMAIN.COM.AU

Server side

John

John@MYDOMAIN.COM.AU

 

 

Start Form As

John

 

Windows log in

MYDOMAIN\John

 

Connect As

John

 

Connect To

IBM i

 

 

USER USER_AUTHENTICATED

Local

John

John@MYDOMAIN.COM.AU

Server side

John

 

 

 

Start Form As

John

 

Windows log in

MYPC\Mary

 

Connect As

John

 

Connect To

Windows (Logged in as MYDOMAIN\John on server)

 

 

USER USER_AUTHENTICATED

Local

John

mary@mypc

Server side

John

John@MYDOMAIN.COM.AU

 

 

Start Form As

John

 

Windows log in

MYPC\Mary

 

Connect As

Mary

 

Connect To

Windows (Logged in as MYPC\Mary on server)

 

 

USER USER_AUTHENTICATED

Local

John

John@MYDOMAIN.COM.AU

Server side

John

mary@serverpc

 

 

*WEBUSER

*WEBUSER represents the User ID used to log on to the web session. If Integrated Windows Authentication is specified, the User ID used to log on to the operating system is used for the web session. Otherwise the User ID specified when the session is started is used. The User ID will be truncated to the length of *WEBUSER.

*WEBUSER is the first ten bytes of the *USER_AUTHENTICATED value.

Examples:

With the following User Registration settings:

Web User ID

Web Server Name

Web Server Port

LANSA User ID

Timeout

John

<ANY>

<ANY>

luser1

0

DFTUSR

<ANY>

<ANY>

luser2

0

A123456789B123456789

<ANY>

<ANY>

luser3

0

 

 

Windows log in

MYDOMAIN\John

Connect As

Integrated Windows Authentication

Connect To

Windows server

*WEBUSER

John

*USER

luser1

*USER_AUTHENTICATED

John

 

 

Windows log in

MYDOMAIN\Mary

Connect As

Integrated Windows Authentication

Connect To

Windows server

*WEBUSER

Mary

*USER

luser2

*USER_AUTHENTICATED

Mary

 

 

Windows log in

MYDOMAIN\John

Connect As

Basic Authentication (login: mydomain\Mary)

Connect To

Windows server

*WEBUSER

Mary

*USER

luser2

*USER_AUTHENTICATED

Mary

 

 

Windows log in

MYDOMAIN\John

Connect As

Basic Authentication (login: A123456789B123456789)

Connect To

IBM i

*WEBUSER

A123456789

*USER

luser3

*USER_AUTHENTICATED

A123456789B123456789