7
The owa_sec Package 7-1
7
The owa_sec Package
This chapter describes the functions, procedures, and data types in the owa_sec package in the PLSQL Web Toolkit.
Parameters that have default values are optional.
7.1 Summary
owa_sec.get_client_hostname function - returns the clients hostname.
owa_sec.get_client_ip function - returns the clients IP address.
owa_sec.get_password function - returns the password that the user entered.
owa_sec.get_user_id function - returns the username that the user entered.
owa_sec.set_authorization procedure - enables the PLSQL application to use custom
authentication. owa_sec.set_protection_realm procedure
- defines the realm that the page is in.
7.2 owa_sec.get_client_hostname function
This function returns the hostname of the client. Table 7–1
defines the properties of the owa_sec.get_client_hostname function.
7.3 owa_sec.get_client_ip function
This function returns the IP address of the client. Table 7–2
defines the properties of the owa_sec.get_client_ip function.
Note: Use the procedures and functions in the owa_sec package
for custom authentication.
Table 7–1 owa_sec.get_client_hostname function
Properties Definitions
Syntax: owa_sec.get_client_hostname return varchar2;
Parameters: None.
Returns: The hostname.
7-2 Oracle Fusion Middleware PLSQL Web Toolkit Reference
7.4 owa_sec.get_password function
This function returns the password that the user used to log in. For security reasons, this function returns a true value only when custom authentication is used. If you call
this function when you are not using custom authentication, the function returns an undefined value. Thus, the database passwords are not exposed.
Table 7–3 defines the properties of the owa_sec.get_password function.
7.5 owa_sec.get_user_id function
This function returns the username that the user used to log in. Table 7–4
defines the properties of the owa_sec.get_user_id function.
7.6 owa_sec.set_authorization procedure
This procedure, called in the initialization portion of the owa_custom package, sets the authorization scheme for the PLSQL Gateway. This implements your
authorize function, which authorizes the user before his requested procedure is run. The placement of the authorize function depends on the scheme you selected.
Table 7–5 defines the properties of the owa_sec.set_authorization procedure.
Table 7–2 owa_sec.get_client_ip function
Properties Definitions
Syntax: owa_sec.get_client_ip return owa_util.ip_address;
Parameters: None.
Returns: The IP address. The
owa_util.ip_address data type is a PLSQL table where the
first four elements contain the four numbers of the IP address. For example, if the IP address is 123.45.67.89 and the variable ipaddr is of the owa_util.ip_address
data type, the variable would contain the following values: ipaddr1 = 123
ipaddr2 = 45 ipaddr3 = 67
ipaddr4 = 89
Table 7–3 owa_sec.get_password function
Properties Definitions
Syntax: owa_sec.get_password return varchar2;
Parameters: None.
Returns: The password.
Table 7–4 owa_sec.get_user_id function
Properties Definitions
Syntax: owa_sec.get_user_id return varchar2;
Parameters: None.
Returns: The username.
The owa_sec Package 7-3
7.7 owa_sec.set_protection_realm procedure