219 OWA_SEC
The OWA_SEC
package provides an interface for custom authentication.
See Also:
For more information about implementation of this package:
The chapter contains the following topics:
219.2 Summary of OWA_SEC Subprograms
This table lists the OWA_SEC subprograms in alphabetical order and briefly describes them.
Table 219-1 OWA_SEC Package Subprograms
Subprogram | Description |
---|---|
Returns the client's hostname |
|
Returns the client's IP address |
|
Returns the password that the user entered |
|
Returns the username that the user entered |
|
Enables the PL/SQL application to use custom authentication |
|
Defines the realm that the page is in |
219.2.1 GET_CLIENT_HOSTNAME Function
This function returns the hostname of the client.
Syntax
OWA_SEC.GET_CLIENT_HOSTNAME RETURN VARCHAR2;
Return Values
The hostname.
219.2.2 GET_CLIENT_IP Function
This function returns the IP address of the client.
Syntax
OWA_SEC.GET_CLIENT_IP RETURN OWA_UTIL.IP_ADDRESS;
Return Values
The IP address. The owa_util.ip_address datatype
is a PL/SQL 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 datatype, the variable would contain the following values:
ipaddr(1) = 123 ipaddr(2) = 45 ipaddr(3) = 67 ipaddr(4) = 89
219.2.3 GET_PASSWORD Function
This function returns the password that the user used to log in.
Syntax
OWA_SEC.GET_PASSWORD RETURN VARCHAR2;
Return Values
The password.
Usage Notes
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.
219.2.4 GET_USER_ID Function
This function returns the username that the user used to log in.
Syntax
OWA_SEC.GET_USER_ID RETURN VARCHAR2;
Return Values
The username.
219.2.5 SET_AUTHORIZATION Procedure
This procedure, called in the initialization portion of the OWA_CUSTOM package, sets the authorization scheme for the PL/SQL 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 select.
Syntax
OWA_SEC.SET_AUTHORIZATION( scheme IN INTEGER);
Parameters
Table 219-2 SET_AUTHORIZATION Procedure Parameters
Parameter | Description |
---|---|
|
The authorization scheme. It is one of the following schemes for
If the function returns |
Related Topics
219.2.6 SET_PROTECTION_REALM Procedure
This procedure sets the realm of the page that is returned to the user. The user enters a username and login that already exist in the realm.
Syntax
OWA_SEC.SET_PROTECTION_REALM( realm IN VARCHAR2);
Parameters
Table 219-3 SET_PROTECTION_REALM Procedure Parameters
Parameter | Description |
---|---|
|
The realm where the page belongs. This string is displayed to the user. |