Previous |
Next |
The GET_ALL_USER_ATTRIBUTES
procedure returns two OUT arrays of user_attribute
names and values for the user name designated by p_username
(with password if required) using the provided auth base, host, and port.
Syntax
APEX_LDAP.GET_ALL_USER_ATTRIBUTES( p_username IN VARCHAR2 DEFAULT NULL, p_pass IN VARCHAR2 DEFAULT NULL, p_auth_base IN VARCHAR2 DEFAULT NULL, p_host IN VARCHAR2, p_port IN VARCHAR2 DEFAULT 389, p_use_ssl IN VARCHAR2 DEFAULT 'N', p_attributes OUT wwv_flow_global.vc_arr2, p_attribute_values OUT wwv_flow_global.vc_arr2);
Parameters
Table: GET_ALL_USER_ATTRIBUTES Parameters describes the parameters for the GET_ALL_USER_ATTRIBUTES
procedure.
GET_ALL_USER_ATTRIBUTES Parameters
Parameter | Description |
---|---|
|
Login name of the user. |
|
Password for |
|
LDAP search base, for example, |
|
LDAP server host name. |
|
LDAP server port number. |
|
Set to 'Y' to use SSL in bind to LDAP server. Set to 'A' to use SSL with one way authentication (requires LDAP server certificate configured in an Oracle wallet). Set to 'N' to not use SSL (default). |
|
An array of attribute names returned. |
|
An array of values returned for each corresponding attribute name returned in p_attributes. |
Example
The following example demonstrates how to use the APEX_LDAP.GET_ALL_USER_ATTRIBUTES
procedure to retrieve all attribute value's associated to a user.
DECLARE L_ATTRIBUTES wwv_flow_global.vc_arr2; L_ATTRIBUTE_VALUES wwv_flow_global.vc_arr2; BEGIN APEX_LDAP.GET_ALL_USER_ATTRIBUTES( p_username => 'firstname.lastname', p_pass => 'abcdef', p_auth_base => 'cn=user,l=amer,dc=my_company,dc=com', p_host => 'our_ldap_sever.my_company.com', p_port => '389', p_attributes => L_ATTRIBUTES, p_attribute_values => L_ATTRIBUTE_VALUES); FOR i IN L_ATTRIBUTES.FIRST..L_ATTRIBUTES.LAST LOOP htp.p('attribute name: '||L_ATTRIBUTES(i)); htp.p('attribute value: '||L_ATTRIBUTE_VALUES(i)); END LOOP; END;