HTTPLib.setProxyBasicAuthentication

HTTPLib.setProxyBasicAuthentication gives the user access to the EGL Rich UI Proxy when that access is protected by JEE basic authentication. The function lets you provide a user ID and password, which are automatically encrypted for inclusion in an HTTP header. This function is not implemented in version .7.

Package

eglx.http

Syntax
static function setProxyBasicAuthentication( userID string in, 
                                             userPassword string in );     
userID
The user ID to send.
password
The password to send.
Example use
You compromise security if you hardcode the user ID and password in your logic. For greater safety, pass the user ID and password from a logon screen; for example, with the following Rich UI code:
userid	TextField { width = 100 };
password 	PasswordTextField { width = 100 };

// the following statement might run in response to a button click
setProxyBasicAuthentication( userid.text, password.text );
Comments
The function adds the following key-value pair to the HTTP request header:
  • The key is authorization.
  • The value is a string composed of Basic and the encrypted user ID and password, which are protected automatically with 64-bit encryption.
Compatibility

Table 1. Compatibility
Target Issue
Java No issues.
JavaScript No issues.