Oracle Internet Directory Application Developer's Guide Release 2 (9.0.2) Part Number A95193-01 |
|
This chapter introduces the DBMS_LDAP_UTL Package, which contains Oracle Extension utility functions. This chapter contains these topics:
This section contains details about the DBMS_LDAP_UTL subprograms. The entries for each subprogram contain the following information:
Table 7-1 Function Entry Information
This section contains information about the DBMS_LDAP_UTL functions. This section contains these topics:
Table 7-3 DBMS_LDAP_UTL Group-Related Subprograms
Function or Procedure | Purpose |
---|---|
Creates a group handle |
|
Associates the given properties with the group handle |
|
Retrieves group properties from an LDAP server |
|
Retrieves a group DN |
Function or Procedure | Purpose |
---|---|
Creates a subscriber handle |
|
Retrieves subscriber properties from an LDAP server |
|
Retrieves a subscriber DN |
The function authenticate_user() authenticates the user against Oracle Internet Directory.
FUNCTION authenticate_user ( ld IN SESSION, user_handle IN HANDLE, auth_type IN PLS_INTEGER, credentials IN VARCHAR2, binary_credentials IN RAW ) RETURN PLS_INTEGER;
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
The function create_user_handle() creates a user handle.
FUNCTION create_user_handle ( user_hd OUT HANDLE, user_type IN PLS_INTEGER, user_id IN VARCHAR2, ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
Other error. |
DBMS_LDAP_UTL.get_user_properties(), DBMS_LDAP_UTL.set_user_handle_properties().
The function set_user_handle_properties() configures the user handle properties.
FUNCTION set_user_handle_properties ( user_hd IN HANDLE, property_type IN PLS_INTEGER, property IN HANDLE ) RETURN PLS_INTEGER;
The subscriber handle doesn't need to be set in User Handle Properties if the user handle is created with TYPE_DN or TYPE_GUID as the user_type.
DBMS_LDAP_UTL.get_user_properties().
The function get_user_properties() retrieves the user properties.
FUNCTION get_user_properties ( ld IN SESSION, user_handle IN HANDLE, attrs IN STRING_COLLECTION, ptype IN PLS_INTEGER, ret_pset_coll OUT PROPERTY_SET_COLLECTION ) RETURN PLS_INTEGER;
This function requires the following:
This function doesn't identify a NULL subscriber handle as a default subscriber. The default subscriber can be obtained from - DBMS_LDAP_UTL.create_subscriber_handle(), where a NULL subscriber_id is passed as an argument.
If the group type is any of the following, then the subscriber handle doesn't need to be set in the user handle properties:
- DBMS_LDAP_UTL.TYPE_GUID
- DBMS_LDAP_UTL.TYPE_DN .
If the subscriber handle is set, then it would be ignored.
DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
The function set_user_properties() modifies the properties of a user.
FUNCTION set_user_properties ( ld IN SESSION, user_handle IN HANDLE, pset_type IN PLS_INTEGER, mod_pset IN PROPERTY_SET, mod_op IN PLS_INTEGER ) RETURN PLS_INTEGER;
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init(), DBMS_LDAP_UTL.get_user_properties().
The function get_user_extended_properties() retrieves user extended properties.
FUNCTION get_user_extended_properties ( ld IN SESSION, user_handle IN HANDLE, ptype IN PLS_INTEGER, filter IN VARCHAR2, rep_pset_coll OUT PROPERTY_SET_COLLECTION ) RETURN PLS_INTEGER;
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init(), DBMS_LDAP_UTL.get_user_properties().
The function get_user_dn() returns the user DN.
FUNCTION get_user_dn ( ld IN SESSION, user_handle IN HANDLE, dn OUT VARCHAR2 ) RETURN PLS_INTEGER;
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
ld |
SESSION |
A valid LDAP session handle. |
user_handle |
HANDLE |
The user handle. |
dn |
VARCHAR2 |
The user DN. |
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init().
The function check_group_membership() checks the membership of the user to a group.
FUNCTION check_group_membership ( ld IN SESSION, user_handle IN HANDLE, group_handle IN HANDLE, nested IN PLS_INTEGER ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
If user is a member. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GROUP_MEMBERSHIP |
If user is not a member. |
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.get_group_membership().
The function locate_subscriber_for_user() retrieves the subscriber for the given user and returns a handle to it.
FUNCTION locate_subscriber_for_user ( ld IN SESSION, user_handle IN HANDLE, subscriber_handle OUT HANDLE ) RETURN PLS_INTEGER;
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
ld |
SESSION |
A valid LDAP session handle. |
user_handle |
HANDLE |
The user handle. |
subscriber_handle |
HANDLE |
The subscriber handle. |
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
The function get_group_membership() returns the list of groups to which the user is a member.
FUNCTION get_group_membership ( user_handle IN HANDLE, nested IN PLS_INTEGER, attr_list IN STRING_COLLECTION, ret_groups OUT PROPERTY_SET_COLLECTION ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
Other error. |
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init().
The function create_group_handle() creates a group handle.
FUNCTION create_group_handle ( group_hd OUT HANDLE, group_type IN PLS_INTEGER, group_id IN VARCHAR2 ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
Other error. |
DBMS_LDAP_UTL.get_group_properties(), DBMS_LDAP_UTL.set_group_handle_properties().
The function set_group_handle_properties() configures the group handle properties.
FUNCTION set_group_handle_properties ( group_hd IN HANDLE, property_type IN PLS_INTEGER, property IN HANDLE ) RETURN PLS_INTEGER;
The subscriber handle doesn't need to be set in Group Handle Properties if the group handle is created with TYPE_DN or TYPE_GUID as the group_type.
DBMS_LDAP_UTL.get_group_properties().
The function get_group_properties() retrieves the group properties.
FUNCTION get_group_properties ( ld IN SESSION, group_handle IN HANDLE, attrs IN STRING_COLLECTION, ptype IN PLS_INTEGER, ret_pset_coll OUT PROPERTY_SET_COLLECTION ) RETURN PLS_INTEGER;
This function requires the following:
This function doesn't identify a NULL subscriber handle as a default subscriber. The default subscriber can be obtained from - DBMS_LDAP_UTL.create_subscriber_handle(), where a NULL subscriber_id is passed as an argument.
If the group type is any of the following, then the subscriber handle doesn't need to be set in the group handle properties:
- DBMS_LDAP_UTL.TYPE_GUID
- DBMS_LDAP_UTL.TYPE_DN .
If the subscriber handle is set, then it would be ignored.
DBMS_LDAP.init(), DBMS_LDAP_UTL.create_group_handle().
The function get_group_dn() returns the group DN.
FUNCTION get_group_dn ( ld IN SESSION, group_handle IN HANDLE dn OUT VARCHAR2 ) RETURN PLS_INTEGER;
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
ld |
SESSION |
A valid LDAP session handle. |
group_handle |
HANDLE |
The group handle. |
dn |
VARCHAR2 |
The group DN. |
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init().
The function create_subscriber_handle() creates a subscriber handle.
FUNCTION create_subscriber_handle ( ld IN SESSION, subscriber_hd OUT HANDLE, subscriber_type IN PLS_INTEGER, subscriber_id IN VARCHAR2 ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
Other error. |
DBMS_LDAP_UTL.get_subscriber_properties().
The function get_subscriber_properties() retrieves the subscriber properties for the given subscriber handle.
FUNCTION get_subscriber_properties ( ld IN SESSION, subscriber_handle IN HANDLE, attrs IN STRING_COLLECTION, ptype IN PLS_INTEGER, ret_pset_coll OUT PROPERTY_SET_COLLECTION ) RETURN PLS_INTEGER;
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init(), DBMS_LDAP_UTL.create_subscriber_handle().
The function get_subscriber_dn() returns the subscriber DN.
FUNCTION get_subscriber_dn ( ld IN SESSION, subscriber_handle IN HANDLE, dn OUT VARCHAR2 ) RETURN PLS_INTEGER;
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
ld |
SESSION |
A valid LDAP session handle. |
subscriber_handle |
HANDLE |
The subscriber handle. |
dn |
VARCHAR2 |
The subscriber DN. |
This function can only be called after a valid LDAP session is obtained from a call to DBMS_LDAP.init().
DBMS_LDAP.init().
The function normalize_dn_with_case() removes unnecessary white space characters from a DN and converts all characters to lower case based on a flag.
FUNCTION normalize_dn_with_case ( dn IN VARCHAR2, lower_case IN PLS_INTEGER, norm_dn OUT VARCHAR2 ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
On failure. |
This function can be used while comparing two DNs.
The function get_property_names() retrieves the list of property names in the property set.
FUNCTION get_property_names ( pset IN PROPERTY_SET, property_names OUT STRING_COLLECTION ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
On error. |
DBMS_LDAP_UTL.get_property values().
The function get_property_values() retrieves the property values (the strings) for a given property name and property.
FUNCTION get_property_values ( pset IN PROPERTY_SET, property_name IN VARCHAR2, property_values OUT STRING_COLLECTION ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
On failure. |
DBMS_LDAP_UTL.get_property_values_len().
The function get_property_values_len() retrieves the binary property values for a given property name and property.
FUNCTION get_property_values_len ( pset IN PROPERTY_SET, property_name IN VARCHAR2, auth_type IN PLS_INTEGER, property_values OUT BINVAL_COLLECTION ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.PARAM_ERROR |
Invalid input parameters. |
DBMS_LDAP_UTL.GENERAL_ERROR |
On failure. |
DBMS_LDAP_UTL.get_property_values().
The procedure free_propertyset_collection() frees the memory associated with property set collection.
PROCEDURE free_propertyset_collection ( pset_collection IN OUT PROPERTY_SET_COLLECTION );
N/A
DBMS_LDAP_UTL.get_group_membership(), DBMS_LDAP_UTL.get_subscriber_properties(), DBMS_LDAP_UTL.get_user_properties(), DBMS_LDAP_UTL.get_group_properties().
The function create_mod_propertyset() creates a MOD_PROPERTY_SET data structure.
FUNCTION create_mod_propertyset ( pset_type IN PLS_INTEGER, pset_name IN VARCHAR2, ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.GENERAL_ERROR |
Other error. |
DBMS_LDAP_UTL.populate_mod_propertyset().
The function populate_mod_propertyset() populates the MOD_PROPERTY_SET data structure.
FUNCTION populate_mod_propertyset ( mod_pset IN MOD_PROPERTY_SET, property_mod_op IN PLS_INTEGER, property_name IN VARCHAR2, property_values IN STRING_COLLECTION ) RETURN PLS_INTEGER;
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
On a successful completion. |
DBMS_LDAP_UTL.GENERAL_ERROR |
Authentication failed. |
DBMS_LDAP_UTL.PWD_GRACELOGIN_WARN |
Grace login for user. |
DBMS_LDAP_UTL.create_mod_propertyset().
The procedure free_mod_propertyset() frees the MOD_PROPERTY_SET data structure.
PROCEDURE free_mod_propertyset ( mod_pset IN MOD_PROPERTY_SET );
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
mod_pset |
PROPERTY_SET |
Mod_PropertySet data structure. |
N/A
DBMS_LDAP_UTL.create_mod_propertyset().
The procedure free_handle() frees the memory associated with the handle.
PROCEDURE free_handle ( handle IN OUT HANDLE );
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
handle |
HANDLE |
A pointer to a handle. |
N/A
DBMS_LDAP_UTL.create_user_handle(), DBMS_LDAP_UTL.create_subscriber_handle(), DBMS_LDAP_UTL.create_group_handle().
The function check_interface_version() checks for support of the interface version.
FUNCTION check_interface_version ( interface_version IN VARCHAR2 ) RETURN PLS_INTEGER;
Parameter Name | Parameter Type | Parameter Description |
---|---|---|
interface_version |
VARCHAR2 |
Version of the interface. |
Value | Description |
---|---|
DBMS_LDAP_UTL.SUCCESS |
Interface version is supported. |
DBMS_LDAP_UTL.GENERAL_ERROR |
Interface version is not supported. |
The DBMS_LDAP_UTL functions can return the values in the following table
.The DBMS_LDAP_UTL package uses the data types in the following table
.
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|