Oracle® HTML DB
Release 2.0
  Go To Table Of Contents
Contents

Previous
Previous
Next
Next
 

HTMLDB_LDAP

You can use HTMLDB_CUSTOM_AUTH to perform various operations related to Lightweight Directory Access Protocol (LDAP) authentication.

Topics:

AUTHENTICATE Function

The AUTHENTICATE function returns a boolean true if the username and password can be used to perform a SIMPLE_BIND_S call using the provided search base, host, and port.

Syntax

FUNCTION AUTHENTICATE(
    p_username     in VARCHAR2 DEFAULT NULL,
    p_password     in VARCHAR2 DEFAULT NULL,
    p_search_base  in VARCHAR2,
    p_host         in VARCHAR2,
    p_port         in VARCHAR2 DEFAULT 389)
RETURN BOOLEAN;

Parameters

Table 16-55 describes the parameters available in the AUTHENTICATE function.

Table 16-55 AUTHENTICATE Parameters

Parameter Description

p_username

Login name of the user.

p_password

Password for p_username.

p_search_base

LDAP search base, for example, dc=users,dc=my,dc=org.

p_host

LDAP server host name.

p_port

LDAP server port number.


IS_MEMBER Function

The IS_MEMBER function returns a boolean true if the user named by p_username (with password if required) is a member of the group specified by the p_group and p_group_base parameters using the provided auth base, host, and port.

Syntax

FUNCTION IS_MEMBER(
    p_username     in VARCHAR2 DEFAULT NULL,
    p_pass         in VARCHAR2 DEFAULT NULL,
    p_auth_base    in VARCHAR2,
    p_host         in VARCHAR2,
    p_port         in VARCHAR2 DEFAULT 389,
    p_group        in VARCHAR2,
    p_group_base   in VARCHAR2)
RETURN BOOLEAN;

Parameters

Table 16-56 describes the parameters available in the IS_MEMBER function.

Table 16-56 IS_MEMBER Parameters

Parameter Description

p_username

Login name of the user.

p_pass

Password for p_username.

p_auth_base

LDAP search base, for example, dc=users,dc=my,dc=org.

p_host

LDAP server host name.

p_port

LDAP server port number.

p_group

Name of the group to be search for membership.

p_group_base

The base dn from which the search should be started.


MEMBER_OF Function

The MEMBER_OF function returns an array of groups the username designated by p_username (with password if required) belongs to, using the provided auth base, host, and port.

Syntax

FUNCTION MEMBER_OF(
    p_username     in VARCHAR2 DEFAULT NULL,
    p_pass         in VARCHAR2 DEFAULT NULL,
    p_auth_base    in VARCHAR2,
    p_host         in VARCHAR2,
    p_port         in VARCHAR2 DEFAULT 389,
RETURN wwv_flow_global.vc_arr2;

Parameters

Table 16-57 describes the parameters available in the MEMBER_OF function.

Table 16-57 MEMBER_OF Parameters

Parameter Description

p_username

Login name of the user.

p_pass

Password for p_username.

p_auth_base

LDAP search base, for example, dc=users,dc=my,dc=org.

p_host

LDAP server host name.

p_port

LDAP server port number.


MEMBER_OF2 Function

The MEMBER_OF2 function returns an VARCHAR2 list of groups the username designated by p_username (with password if required) belongs to, using the provided auth base, host, and port.

Syntax

FUNCTION MEMBER_OF2(
    p_username     in VARCHAR2 DEFAULT NULL,
    p_pass         in VARCHAR2 DEFAULT NULL,
    p_auth_base    in VARCHAR2,
    p_host         in VARCHAR2,
    p_port         in VARCHAR2 DEFAULT 389,
RETURN VARCHAR2;

Parameters

Table 16-58 describes the parameters available in the MEMBER_OF2 function.

Table 16-58 MEMBER_OF2 Parameters

Parameter Description

p_username

Login name of the user.

p_pass

Password for p_username.

p_auth_base

LDAP search base, for example, dc=users,dc=my,dc=org.

p_host

LDAP server host name.

p_port

LDAP server port number.


GET_USER_ATTRIBUTES Procedure

The GET_USER_ATTRIBUTES procedure returns an OUT array of user_attribute values for the username designated by p_username (with password if required) corresponding to the attribute names passed in p_attributes, using the provided auth base, host, and port.

Syntax

PROCEDURE GET_USER_ATTRIBUTES(
    p_username          in VARCHAR2 DEFAULT NULL,
    p_pass              in VARCHAR2 DEFAULT NULL,
    p_auth_base         in VARCHAR2,
    p_host              in VARCHAR2,
    p_port              in VARCHAR2 DEFAULT 389,
    p_attributes        in  wwv_flow_global.vc_arr2,
    p_attribute_values  out wwv_flow_global.vc_arr2);

Parameters

Table 16-59 describes the parameters available in the GET_USER_ATTRIBUTES procedure.

Table 16-59 GET_USER_ATTRIBUTES Parameters

Parameter Description

p_username

Login name of the user.

p_pass

Password for p_username.

p_auth_base

LDAP search base, for example, dc=users,dc=my,dc=org.

p_host

LDAP server host name.

p_port

LDAP server port number.

p_attributes

An array of attribute names for which values are to be returned.

p_attribute_values

An array of values returned for each corresponding attribute name in p_attributes.


GET_ALL_USER_ATTRIBUTES Procedure

The GET_ALL_USER_ATTRIBUTES procedure returns two OUT arrays of user_attribute names and values for the username designated by p_username (with password if required) using the provided auth base, host, and port.

Syntax

PROCEDURE GET_ALL_USER_ATTRIBUTES(
    p_username          in VARCHAR2 DEFAULT NULL,
    p_pass              in VARCHAR2 DEFAULT NULL,
    p_auth_base         in VARCHAR2,
    p_host              in VARCHAR2,
    p_port              in VARCHAR2 DEFAULT 389,
    p_attributes        out  wwv_flow_global.vc_arr2,
    p_attribute_values  out wwv_flow_global.vc_arr2);

Parameters

Table 16-60 describes the parameters available in the GET_ALL_USER_ATTRIBUTES procedure.

Table 16-60 GET_ALL_USER_ATTRIBUTES Parameters

Parameter Description

p_username

Login name of the user.

p_pass

Password for p_username.

p_auth_base

LDAP search base, for example, dc=users,dc=my,dc=org.

p_host

LDAP server host name.

p_port

LDAP server port number.

p_attributes

An array of attribute names returned.

p_attribute_values

An array of values returned for each corresponding attribute name returned in p_attributes.