[Home] [Help]
PACKAGE: SYS.DBMS_LDAP_UTL
Source
1 PACKAGE DBMS_LDAP_UTL AS
2
3 /**
4 *************************************************************************************************
5 * NAME
6 * DBMS_LDAP_UTL
7 *
8 * DESCRIPTION
9 * Package specification for DBMS_LDAP_UTL
10 * This pakcage contains Oracle EXtension utility functions.
11 * These functions can be used for authentication or querying information
12 * on users, groups or subscribers in the LDAP server.
13 *
14 * SYNTAX
15 * N/A
16 *
17 * REQUIRES
18 * 1. Most of the functions accept a valid ldap session as an argument.
19 * This ldap session has to be obtained from DBMS_LDAP.init() function.
20 * 2. The functions in the package lookup the Oracle Context schema in the
21 * LDAP server to query information on users, groups and subscribers.
22 *
23 * PARAMETERS
24 * NONE
25 *
26 * RETURNS
27 * This package returns error codes and does not raise any exceptions.
28 * See the documentation on individual functions for corresponding
29 * error codes returned.
30 *
31 * EXCEPTIONS
32 * THIS PACKAGE DOES NOT RAISE ANY EXCEPTIONS.
33 *
34 * USAGE
35 * This Package can be used for querying information on users, groups
36 * and subscribers in the LDAP server.
37 *
38 * EXAMPLES
39 *
40 * SEE
41 *
42 ****************************************************************************************************
43 */
44 VERSION CONSTANT VARCHAR2(256) := '2';
45 INTERFACE_VERSION CONSTANT VARCHAR2(256) := '2';
46
47 --
48 -- DBMS_LDAP_UTL data type definitions
49 --
50
51 -- We use RAW(32) as a data structure to store external pointers
52 -- It is big enough to store 256 bit pointers!
53
54 -- this data structure holds a pointer to Handle.
55 SUBTYPE HANDLE IS RAW(32);
56
57 -- this data structure holds a pointer to List of Properties.
58 SUBTYPE PROPERTY_SET IS RAW(32);
59
60 -- this data structure holds a pointer to List of Properties.
61 SUBTYPE MOD_PROPERTY_SET IS RAW(32);
62
63 -- this data structure holds a pointer to List of Property sets.
64 TYPE PROPERTY_SET_COLLECTION is TABLE of PROPERTY_SET
65 INDEX BY BINARY_INTEGER;
66
67 -- String collection.
68 SUBTYPE STRING_COLLECTION IS
69 DBMS_LDAP.STRING_COLLECTION;
70
71 -- Binval collection.
72 SUBTYPE BINVAL_COLLECTION IS
73 DBMS_LDAP.BINVAL_COLLECTION;
74
75 -- BLOB collection.
76 SUBTYPE BLOB_COLLECTION IS
77 DBMS_LDAP.BLOB_COLLECTION;
78
79 -- Session.
80 SUBTYPE SESSION IS DBMS_LDAP.SESSION;
81
82 --
83 -- DBMS_LDAP_UTL function definitions
84 --
85 /**
86 *******************************************************************************
87 * NAME
88 * check_interface_version
89 *
90 * DESCRIPTION
91 * Checks for the support of interface version.
92 *
93 * SYNTAX
94 * FUNCTION check_interface_version
95 * (
96 *
97 * interface_version IN VARCHAR2
98 *
99 * )
100 * RETURN PLS_INTEGER;
101 *
102 * REQUIRES
103 *
104 * PARAMETERS
105 * (VARCHAR2 ) interface_version - Version of the Interface.
106 *
107 * RETURNS
108 *
109 * DBMS_LDAP_UTL.SUCCESS - Version Supported.
110 * DBMS_LDAP_UTL.GENERAL_ERROR - Version not Supported.
111 *
112 *
113 * USAGE
114 * N/A
115 *
116 * EXAMPLES
117 *
118 * SEE
119 * DBMS_LDAP_UTL.create_user_handle()
120 *
121 ******************************************************************************
122 */
123 FUNCTION check_interface_version ( interface_version IN VARCHAR2)
124 RETURN PLS_INTEGER;
125
126 /**
127 *******************************************************************************
128 * NAME
129 * create_subscriber_handle
130 *
131 * DESCRIPTION
132 * This function creates a subscriber handle.
133 *
134 * SYNTAX
135 * FUNCTION create_subscriber_handle
136 * (
137 *
138 * subscriber_hd OUT HANDLE,
139 * subscriber_type IN PLS_INTEGER,
140 * subscriber_id IN VARCHAR2
141 *
142 * )
143 * RETURN PLS_INTEGER;
144 *
145 * REQUIRES
146 *
147 * PARAMETERS
148 * (HANDLE ) subscriber_hd - A pointer to a handle to
149 * subscriber.
150 * (PLS_INTEGER ) subscriber_type - The type of subscriber id that
151 * is passed.
152 * Valid values for this argument are:
153 * - DBMS_LDAP_UTL.TYPE_DN
154 * - DBMS_LDAP_UTL.TYPE_GUID
155 * - DBMS_LDAP_UTL.TYPE_NICKNAME
156 * - DBMS_LDAP_UTL.TYPE_DEFAULT
157 * (VARCHAR2 ) subscriber_id - The subscriber id representing
158 * the subscriber entry.
159 * This can be NULL if
160 * subscriber_type is :
161 * - DBMS_LDAP_UTL.TYPE_DEFAULT
162 * then the default subscriber
163 * would be fetched from
164 * Root Oracle Context.
165 *
166 * RETURNS
167 *
168 * DBMS_LDAP_UTL.LDAP_SUCCESS - On a successful completion.
169 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
170 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
171 *
172 *
173 * USAGE
174 * N/A
175 *
176 * EXAMPLES
177 *
178 * SEE
179 * DBMS_LDAP_UTL.get_subscriber_properties().
180 *
181 ******************************************************************************
182 */
183 FUNCTION create_subscriber_handle ( subscriber_hd OUT HANDLE,
184 subscriber_type IN PLS_INTEGER,
185 subscriber_id IN VARCHAR2)
186 RETURN PLS_INTEGER;
187
188 /**
189 *******************************************************************************
190 * NAME
191 * get_subscriber_properties
192 *
193 * DESCRIPTION
194 * Retrieves the subsciber properties for the given subscriber handle.
195 *
196 * SYNTAX
197 * FUNCTION get_subscriber_properties
198 * (
199 *
200 * ld IN SESSION,
201 * subscriber_handle IN HANDLE,
202 * attrs IN STRING_COLLECTION,
203 * ptype IN PLS_INTEGER,
204 * ret_pset_coll OUT PROPERTY_SET_COLLECTION,
205 *
206 * )
207 * RETURN PLS_INTEGER;
208 *
209 * REQUIRES
210 * This function requires a valid ldap session handle which
211 * has to be obtained from DBMS_LDAP.init() function.
212 *
213 * PARAMETERS
214 * (SESSION ) ld - A valid ldap session handle.
215 * (HANDLE ) subscriber_handle - The subscriber handle
216 * (STRING_COLLECTION ) attrs - List of Attributes that
217 * need to be fetched for
218 * the subscriber.
219 * (PLS_INTEGER ) ptype - Type of properties to be
220 * returned.
221 * Valid values:
222 * - DBMS_LDAP_UTL.ENTRY_PROPERITES
223 * - DBMS_LDAP_UTL.COMMON_PROPERITES : To retrieve Subscriber's Oracle Context Properties.
224 * (PROPERTY_SET_COLLECTION ) ret_pset_coll - The subscriber details
225 * containing the requested
226 * attributes by the caller.
227 *
228 * RETURNS
229 *
230 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
231 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
232 * DBMS_LDAP_UTL.NO_SUCH_SUBSCRIBER - Subscriber doesn't exist.
233 * DBMS_LDAP_UTL.MULTIPLE_SUBSCRIBER_ENTRIES - Multiple number of subscriber
234 * DN entries exist in the
235 * directory for the given
236 * subscriber.
237 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
238 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
239 * DBMS_LDAP error codes - Returns proper LDAP error codes
240 * for unconditional failures
241 * while carrying out
242 * LDAP operations by the ldap
243 * server.
244 *
245 *
246 * USAGE
247 * This function can only be called after a valid
248 * ldap session is obtained from a call to DBMS_LDAP.init().
249 *
250 * EXAMPLES
251 *
252 * SEE
253 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_subscriber_handle().
254 *
255 ******************************************************************************
256 */
257 FUNCTION get_subscriber_properties( ld IN SESSION,
258 subscriber_handle IN HANDLE,
259 attrs IN STRING_COLLECTION,
260 ptype IN PLS_INTEGER,
261 ret_pset_coll OUT PROPERTY_SET_COLLECTION)
262 RETURN PLS_INTEGER;
263
264 /**
265 *******************************************************************************
266 * NAME
267 * get_subscriber_ext_properties
268 *
269 * DESCRIPTION
270 * Retrieves the subsciber extended properties for the given subscriber handle.
271 *
272 * SYNTAX
273 * FUNCTION get_subscriber_ext_properties
274 * (
275 *
276 * ld IN SESSION,
277 * subscriber_handle IN HANDLE,
278 * attrs IN STRING_COLLECTION,
279 * ptype IN PLS_INTEGER,
280 * filter IN VARCHAR2,
281 * ret_pset_coll OUT PROPERTY_SET_COLLECTION,
282 *
283 * )
284 * RETURN PLS_INTEGER;
285 *
286 * REQUIRES
287 * This function requires a valid ldap session handle which
288 * has to be obtained from DBMS_LDAP.init() function.
289 *
290 * PARAMETERS
291 * (SESSION ) ld - A valid ldap session handle.
292 * (HANDLE ) subscriber_handle - The subscriber handle
293 * (STRING_COLLECTION ) attrs - List of Attributes that
294 * need to be fetched for
295 * the subscriber.
296 * (PLS_INTEGER ) ptype - Type of properties to be
297 * returned.
298 * Valid values:
299 * - DBMS_LDAP_UTL.DEFAULT_RAD_PROPERTIES
300 * - DBMS_LDAP_UTL.COMMON_PROPERITES : To retrieve Subscriber's Oracle Context Properties.
301 * (VARCHAR2) filter - Ldap filter to further
302 * refine the user properties
303 * returned by function.
304 * (PROPERTY_SET_COLLECTION ) ret_pset_coll - The subscriber details
305 * containing the requested
306 * attributes by the caller.
307 *
308 * RETURNS
309 *
310 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
311 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
312 * DBMS_LDAP_UTL.NO_SUCH_SUBSCRIBER - Subscriber doesn't exist.
313 * DBMS_LDAP_UTL.MULTIPLE_SUBSCRIBER_ENTRIES - Multiple number of subscriber
314 * DN entries exist in the
315 * directory for the given
316 * subscriber.
317 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
318 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
319 * DBMS_LDAP error codes - Returns proper LDAP error codes
320 * for unconditional failures
321 * while carrying out
322 * LDAP operations by the ldap
323 * server.
324 *
325 *
326 * USAGE
327 * This function can only be called after a valid
328 * ldap session is obtained from a call to DBMS_LDAP.init().
329 *
330 * EXAMPLES
331 *
332 * SEE
333 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_subscriber_handle().
334 *
335 ******************************************************************************
336 */
337 FUNCTION get_subscriber_ext_properties( ld IN SESSION,
338 subscriber_handle IN HANDLE,
339 attrs IN STRING_COLLECTION,
340 ptype IN PLS_INTEGER,
341 filter IN VARCHAR2,
342 ret_pset_coll OUT PROPERTY_SET_COLLECTION)
343 RETURN PLS_INTEGER;
344
345 /**
346 *******************************************************************************
347 * NAME
348 * get_subscriber_dn
349 *
350 * DESCRIPTION
351 * Returns the subscriber DN.
352 *
353 * SYNTAX
354 * FUNCTION get_subscriber_dn
355 * (
356 *
357 * ld IN SESSION,
358 * subscriber_handle IN HANDLE,
359 * dn OUT VARCHAR2
360 *
361 * )
362 * RETURN PLS_INTEGER;
363 *
364 * REQUIRES
365 * This function requires a valid ldap session handle which
366 * has to be obtained from DBMS_LDAP.init() function.
367 *
368 * PARAMETERS
369 * (SESSION ) ld - A valid ldap session handle.
370 * (HANDLE ) subscriber_handle - The subscriber handle
371 * (VARCHAR2 ) dn - The subscriber DN
372 *
373 * RETURNS
374 *
375 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
376 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
377 * DBMS_LDAP_UTL.NO_SUCH_SUBSCRIBER - Subscriber doesn't exist.
378 * DBMS_LDAP_UTL.MULTIPLE_SUBSCRIBER_ENTRIES - Multiple number of subscriber
379 * DN entries exist in the
380 * directory for the given
381 * subscriber.
382 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
383 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
384 * DBMS_LDAP error codes - Returns proper LDAP error codes
388 * server.
385 * for unconditional failures
386 * while carrying out
387 * LDAP operations by the ldap
389 *
390 *
391 * USAGE
392 * This function can only be called after a valid
393 * ldap session is obtained from a call to DBMS_LDAP.init().
394 *
395 * EXAMPLES
396 *
397 * SEE
398 * DBMS_LDAP.init().
399 *
400 ******************************************************************************
401 */
402 FUNCTION get_subscriber_dn( ld IN SESSION,
403 subscriber_handle IN HANDLE,
404 dn OUT VARCHAR2)
405 RETURN PLS_INTEGER;
406 /**
407 *******************************************************************************
408 * NAME
409 * free_propertyset_collection
410 *
411 * DESCRIPTION
412 * Frees the memory associated with Property set collection.
413 *
414 * SYNTAX
415 * PROCEDURE free_propertyset_collection
416 * (
417 *
418 * pset_collection IN OUT PROPERTY_SET_COLLECTION
419 *
420 * );
421 *
422 * REQUIRES
423 *
424 * PARAMETERS
425 * (PROPERTY_SET_COLLECTION ) pset_collection - Property set collection
426 * returned from one of the
427 * following functions:
428 * - DBMS_LDAP_UTL.get_group_membership().
429 * - DBMS_LDAP_UTL.get_subscriber_properties().
430 * - DBMS_LDAP_UTL.get_user_properties().
431 * - DBMS_LDAP_UTL.get_group_properties().
432 *
433 * RETURNS
434 * NONE
435 *
436 *
437 * USAGE
438 * N/A
439 *
440 * EXAMPLES
441 *
442 * SEE
443 * DBMS_LDAP_UTL.get_group_membership(), DBMS_LDAP_UTL.get_subscriber_properties(), DBMS_LDAP_UTL.get_user_properties(), DBMS_LDAP_UTL.get_group_properties().
444 *
445 ******************************************************************************
446 */
447 PROCEDURE free_propertyset_collection ( pset_collection IN OUT PROPERTY_SET_COLLECTION);
448
449
450 /**
451 *******************************************************************************
452 * NAME
453 * create_user_handle
454 *
455 * DESCRIPTION
456 * This function creates a user handle.
457 *
458 * SYNTAX
459 * FUNCTION create_user_handle
460 * (
461 *
462 * user_hd OUT HANDLE,
463 * user_type IN PLS_INTEGER,
464 * user_id IN VARCHAR2
465 *
466 * )
467 * RETURN PLS_INTEGER;
468 *
469 * REQUIRES
470 *
471 * PARAMETERS
472 * (HANDLE ) user_hd - A pointer to a handle to
473 * user.
474 * (PLS_INTEGER ) user_type - The type of user id that
475 * is passed.
476 * Valid values for this argument are:
477 * - DBMS_LDAP_UTL.TYPE_DN
478 * - DBMS_LDAP_UTL.TYPE_GUID
479 * - DBMS_LDAP_UTL.TYPE_NICKNAME
480 * (VARCHAR2 ) user_id - The user id representing
481 * the user entry.
482 *
483 * RETURNS
484 *
485 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
486 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
487 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
488 *
489 *
490 * USAGE
491 * N/A
492 *
493 * EXAMPLES
494 *
495 * SEE
496 * DBMS_LDAP_UTL.get_user_properties(), DBMS_LDAP_UTL.set_user_handle_properties().
497 *
498 ******************************************************************************
499 */
500 FUNCTION create_user_handle ( user_hd OUT HANDLE,
501 user_type IN PLS_INTEGER,
502 user_id IN VARCHAR2)
503 RETURN PLS_INTEGER;
504
505 /**
506 *******************************************************************************
507 * NAME
508 * set_user_handle_properties
509 *
510 * DESCRIPTION
511 * Configures the user handle properties.
512 *
513 * SYNTAX
514 * FUNCTION set_user_handle_properties
515 * (
516 *
517 * user_hd IN HANDLE,
518 * property_type IN PLS_INTEGER,
519 * property IN HANDLE
520 *
521 * )
522 * RETURN PLS_INTEGER;
523 *
524 * REQUIRES
525 *
526 * PARAMETERS
527 * (HANDLE ) user_hd - A pointer to a handle to
528 * user.
529 * (PLS_INTEGER ) property_type - The type of property that
533 * (HANDLE ) property - The property describing
530 * is passed.
531 * Valid values for this argument are:
532 * - DBMS_LDAP_UTL.SUBSCRIBER_HANDLE
534 * the user entry.
535 *
536 * RETURNS
537 *
538 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
539 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
540 * DBMS_LDAP_UTL.RESET_HANDLE - When caller tries to reset
541 * the existing handle
542 * properties.
543 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
544 *
545 *
546 * USAGE
547 * Subscriber Handle need not be set in User Handle Properties
548 * if the User Handle is created with TYPE_DN or TYPE_GUID as user_type.
549 *
550 *
551 * EXAMPLES
552 *
553 * SEE
554 * DBMS_LDAP_UTL.get_user_properties().
555 *
556 ******************************************************************************
557 */
558 FUNCTION set_user_handle_properties ( user_hd IN HANDLE,
559 property_type IN PLS_INTEGER,
560 property IN HANDLE)
561 RETURN PLS_INTEGER;
562
563 /**
564 *******************************************************************************
565 * NAME
566 * get_user_properties
567 *
568 * DESCRIPTION
569 * Retrieves the user properties.
570 *
571 * SYNTAX
572 * FUNCTION get_user_properties
573 * (
574 *
575 * ld IN SESSION,
576 * user_handle IN HANDLE,
577 * attrs IN STRING_COLLECTION,
578 * ptype IN PLS_INTEGER,
579 * ret_pset_coll OUT PROPERTY_SET_COLLECTION
580 *
581 * )
582 * RETURN PLS_INTEGER;
583 *
584 * REQUIRES
585 * This function requires a valid ldap session handle which
586 * has to be obtained from DBMS_LDAP.init() function.
587 *
588 *
589 * PARAMETERS
590 * (SESSION ) ld - A valid ldap session handle.
591 * (HANDLE ) user_handle - The user handle
592 * (STRING_COLLECTION ) attrs - List of Attributes that
593 * need to be fetched for
594 * the user.
595 * (PLS_INTEGER ) ptype - Type of properties to be
596 * returned.
597 * Valid values:
598 * - DBMS_LDAP_UTL.ENTRY_PROPERITES
599 * - DBMS_LDAP_UTL.NICKNAME_PROPERTY
600 * (PROPERTY_SET_COLLECTION ) ret_pset_collection - The user details
601 * containing the requested
602 * attributes by the caller.
603 *
604 * RETURNS
605 *
606 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
607 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
608 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
609 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user
610 * DN entries exist in the
611 * directory for the given
612 * user.
613 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
614 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
615 * DBMS_LDAP error codes - Returns proper LDAP error codes
616 * for unconditional failures
617 * while carrying out
618 * LDAP operations by the ldap
619 * server.
620 *
621 *
622 * USAGE
623 * This function requires a valid ldap session handle which
624 * has to be obtained from DBMS_LDAP.init() function.
625 *
626 * This function requires a valid subscriber handle to be set
627 * in the user handle properties if the user type is of:
628 * - DBMS_LDAP_UTL.TYPE_NICKNAME.
629 * This function doesn't identify a NULL subscriber handle
630 * as a default subscriber.
631 * Default subscriber can be obtained from :
632 * - DBMS_LDAP_UTL.create_subscriber_handle()
633 * where a NULL subscriber_id is passed as an argument.
634 * If the user type is any of the following:
635 * - DBMS_LDAP_UTL.TYPE_GUID.
636 * - DBMS_LDAP_UTL.TYPE_DN.
637 * then the subscriber handle need not be set in the user
638 * handle properties, even if set it would be ignored.
639 *
640 * EXAMPLES
641 *
642 * SEE
643 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
644 *
645 ******************************************************************************
646 */
650 ptype IN PLS_INTEGER,
647 FUNCTION get_user_properties( ld IN SESSION,
648 user_handle IN HANDLE,
649 attrs IN STRING_COLLECTION,
651 ret_pset_coll OUT PROPERTY_SET_COLLECTION)
652 RETURN PLS_INTEGER;
653
654 /**
655 *******************************************************************************
656 * NAME
657 * get_user_dn
658 *
659 * DESCRIPTION
660 * Returns the user DN.
661 *
662 * SYNTAX
663 * FUNCTION get_user_dn
664 * (
665 *
666 * ld IN SESSION,
667 * user_handle IN HANDLE,
668 * dn OUT VARCHAR2
669 *
670 * )
671 * RETURN PLS_INTEGER;
672 *
673 * REQUIRES
674 * This function requires a valid ldap session handle which
675 * has to be obtained from DBMS_LDAP.init() function.
676 *
677 * PARAMETERS
678 * (SESSION ) ld - A valid ldap session handle.
679 * (HANDLE ) user_handle - The user handle
680 * (VARCHAR2 ) dn - The user DN
681 *
682 * RETURNS
683 *
684 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
685 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
686 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
687 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user
688 * DN entries exist in the
689 * directory for the given
690 * user.
691 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
692 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
693 * DBMS_LDAP error codes - Returns proper LDAP error codes
694 * for unconditional failures
695 * while carrying out
696 * LDAP operations by the ldap
697 * server.
698 *
699 *
700 * USAGE
701 * This function can only be called after a valid
702 * ldap session is obtained from a call to DBMS_LDAP.init().
703 *
704 * EXAMPLES
705 *
706 * SEE
707 * DBMS_LDAP.init().
708 *
709 ******************************************************************************
710 */
711 FUNCTION get_user_dn( ld IN SESSION,
712 user_handle IN HANDLE,
713 dn OUT VARCHAR2)
714 RETURN PLS_INTEGER;
715
716 /**
717 *******************************************************************************
718 * NAME
719 * create_group_handle
720 *
721 * DESCRIPTION
722 * This function creates a group handle.
723 *
724 * SYNTAX
725 * FUNCTION create_group_handle
726 * (
727 *
728 * group_hd OUT HANDLE,
729 * group_type IN PLS_INTEGER,
730 * group_id IN VARCHAR2
731 *
732 * )
733 * RETURN PLS_INTEGER;
734 *
735 * REQUIRES
736 *
737 * PARAMETERS
738 * (HANDLE ) group_hd - A pointer to a handle to
739 * group.
740 * (PLS_INTEGER ) group_type - The type of group id that
741 * is passed.
742 * Valid values for this argument are:
743 * - DBMS_LDAP_UTL.TYPE_DN
744 * - DBMS_LDAP_UTL.TYPE_GUID
745 * - DBMS_LDAP_UTL.TYPE_NICKNAME
746 * (VARCHAR2 ) group_id - The group id representing
747 * the group entry.
748 *
749 * RETURNS
750 *
751 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
752 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
753 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
754 *
755 *
756 * USAGE
757 * N/A
758 *
759 *
760 * EXAMPLES
761 *
762 * SEE
763 * DBMS_LDAP_UTL.get_group_properties(), DBMS_LDAP_UTL.set_group_handle_properties().
764 *
765 ******************************************************************************
766 */
767 FUNCTION create_group_handle ( group_hd OUT HANDLE,
768 group_type IN PLS_INTEGER,
769 group_id IN VARCHAR2)
770 RETURN PLS_INTEGER;
771
772 /**
773 *******************************************************************************
774 * NAME
775 * set_group_handle_properties
776 *
777 * DESCRIPTION
778 * Configures the group handle properties.
779 *
780 * SYNTAX
781 * FUNCTION set_group_handle_properties
782 * (
783 *
784 * group_hd IN HANDLE,
785 * property_type IN PLS_INTEGER,
789 * RETURN PLS_INTEGER;
786 * property IN HANDLE
787 *
788 * )
790 *
791 * REQUIRES
792 *
793 * PARAMETERS
794 * (HANDLE ) group_hd - A pointer to a handle to
795 * group.
796 * (PLS_INTEGER ) property_type - The type of property that
797 * is passed.
798 * Valid values for this argument are:
799 * - DBMS_LDAP_UTL.GROUP_HANDLE
800 * (HANDLE ) property - The property describing
801 * the group entry.
802 *
803 * RETURNS
804 *
805 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
806 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
807 * DBMS_LDAP_UTL.RESET_HANDLE - When caller tries to reset
808 * the existing handle
809 * properties.
810 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
811 *
812 *
813 * USAGE
814 * Subscriber Handle need not be set in Group Handle Properties
815 * if the Group Handle is created with TYPE_DN or TYPE_GUID as group_type.
816 *
817 *
818 * EXAMPLES
819 *
820 * SEE
821 * DBMS_LDAP_UTL.get_group_properties().
822 *
823 ******************************************************************************
824 */
825 FUNCTION set_group_handle_properties ( group_hd IN HANDLE,
826 property_type IN PLS_INTEGER,
827 property IN HANDLE)
828 RETURN PLS_INTEGER;
829
830 /**
831 *******************************************************************************
832 * NAME
833 * get_group_properties
834 *
835 * DESCRIPTION
836 * Retrieves the group properties.
837 *
838 * SYNTAX
839 * FUNCTION get_group_properties
840 * (
841 *
842 * ld IN SESSION,
843 * group_handle IN HANDLE,
844 * attrs IN STRING_COLLECTION,
845 * ptype IN PLS_INTEGER,
846 * ret_pset_coll OUT PROPERTY_SET_COLLECTION
847 *
848 * )
849 * RETURN PLS_INTEGER;
850 *
851 * REQUIRES
852 * This function requires a valid ldap session handle which
853 * has to be obtained from DBMS_LDAP.init() function.
854 *
855 * PARAMETERS
856 * (SESSION ) ld - A valid ldap session handle.
857 * (HANDLE ) group_handle - The group handle
858 * (STRING_COLLECTION ) attrs - List of Attributes that
859 * need to be fetched for
860 * the group.
861 * (PLS_INTEGER ) ptype - Type of properties to be
862 * returned.
863 * Valid values:
864 * - DBMS_LDAP_UTL.ENTRY_PROPERITES
865 * (PROPERTY_SET_COLLECTION ) ret_pset_coll - The group details
866 * containing the requested
867 * attributes by the caller.
868 *
869 * RETURNS
870 *
871 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
872 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
873 * DBMS_LDAP_UTL.NO_SUCH_GROUP - Group doesn't exist.
874 * DBMS_LDAP_UTL.MULTIPLE_GROUP_ENTRIES - Multiple number of group
875 * DN entries exist in the
876 * directory for the given
877 * group.
878 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
879 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
880 * DBMS_LDAP error codes - Returns proper LDAP error codes
881 * for unconditional failures
882 * while carrying out
883 * LDAP operations by the ldap
884 * server.
885 *
886 *
887 * USAGE
888 * This function requires a valid ldap session handle which
889 * has to be obtained from DBMS_LDAP.init() function.
890 * This function requires a valid subscriber handle to be set
891 * in the group handle properties if the group type is of:
892 * - DBMS_LDAP_UTL.TYPE_NICKNAME.
893 * This function doesn't identify a NULL subscriber handle
894 * as a default subscriber.
895 * Default subscriber can be obtained from :
896 * - DBMS_LDAP_UTL.create_subscriber_handle()
897 * where a NULL subscriber_id is passed as an argument.
898 * If the group type is any of the following:
899 * - DBMS_LDAP_UTL.TYPE_GUID.
900 * - DBMS_LDAP_UTL.TYPE_DN.
901 * then the subscriber handle need not be set in the group
902 * handle properties, even if set it would be ignored.
903 *
904 * EXAMPLES
905 *
906 * SEE
910 */
907 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_group_handle().
908 *
909 ******************************************************************************
911 FUNCTION get_group_properties( ld IN SESSION,
912 group_handle IN HANDLE,
913 attrs IN STRING_COLLECTION,
914 ptype IN PLS_INTEGER,
915 ret_pset_coll OUT PROPERTY_SET_COLLECTION)
916 RETURN PLS_INTEGER;
917
918 /**
919 *******************************************************************************
920 * NAME
921 * get_group_dn
922 *
923 * DESCRIPTION
924 * Returns the group DN.
925 *
926 * SYNTAX
927 * FUNCTION get_group_dn
928 * (
929 *
930 * ld IN SESSION,
931 * group_handle IN HANDLE,
932 * dn OUT VARCHAR2
933 *
934 * )
935 * RETURN PLS_INTEGER;
936 *
937 * REQUIRES
938 * This function requires a valid ldap session handle which
939 * has to be obtained from DBMS_LDAP.init() function.
940 *
941 * PARAMETERS
942 * (SESSION ) ld - A valid ldap session handle.
943 * (HANDLE ) group_handle - The group handle
944 * (VARCHAR2 ) dn - The group DN
945 *
946 * RETURNS
947 *
948 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
949 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
950 * DBMS_LDAP_UTL.NO_SUCH_GROUP - Group doesn't exist.
951 * DBMS_LDAP_UTL.MULTIPLE_GROUP_ENTRIES - Multiple number of group
952 * DN entries exist in the
953 * directory for the given
954 * group.
955 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
956 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
957 * DBMS_LDAP error codes - Returns proper LDAP error codes
958 * for unconditional failures
959 * while carrying out
960 * LDAP operations by the ldap
961 * server.
962 *
963 *
964 * USAGE
965 * This function can only be called after a valid
966 * ldap session is obtained from a call to DBMS_LDAP.init().
967 *
968 * EXAMPLES
969 *
970 * SEE
971 * DBMS_LDAP.init().
972 *
973 ******************************************************************************
974 */
975 FUNCTION get_group_dn( ld IN SESSION,
976 group_handle IN HANDLE,
977 dn OUT VARCHAR2)
978 RETURN PLS_INTEGER;
979
980 /**
981 *******************************************************************************
982 * NAME
983 * authenticate_user
984 *
985 * DESCRIPTION
986 * This function Authenticates the user against OiD.
987 *
988 * SYNTAX
989 * FUNCTION authenticate_user
990 * (
991 *
992 * ld IN SESSION,
993 * user_handle IN HANDLE,
994 * auth_type IN PLS_INTEGER,
995 * credentials IN VARCHAR2,
996 * binary_credentials IN RAW
997 *
998 * )
999 * RETURN PLS_INTEGER;
1000 *
1001 * REQUIRES
1002 * This function requires a valid ldap session handle which
1003 * has to be obtained from init() function.
1004 *
1005 * PARAMETERS
1006 * (SESSION ) ld - A valid ldap session handle.
1007 * (HANDLE ) user - User handle.
1008 * (PLS_INTEGER ) auth_type - Type of authentication,
1009 * Valid values are:
1010 * - DBMS_LDAP_UTL.AUTH_SIMPLE
1011 * (VARCHAR2 ) credentials - The user credentials,
1012 * Valid values :
1013 * for DBMS_LDAP_UTL.AUTH_SIMPLE - password
1014 * (RAW ) binary_credentials - The binary credentials,
1015 * Valid values :
1016 * for DBMS_LDAP_UTL.AUTH_SIMPLE - NULL
1017 *
1018 * RETURNS
1019 *
1020 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1021 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1022 * DBMS_LDAP_UTL.GENERAL_ERROR - Authentication failed.
1023 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
1024 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user DN
1025 * entries exist in the
1026 * directory for the given user.
1027 * DBMS_LDAP_UTL.INVALID_SUBSCRIBER_ORCL_CTX - Invalid Subscriber Oracle Context.
1031 * directory for the given
1028 * DBMS_LDAP_UTL.NO_SUCH_SUBSCRIBER - Subscriber doesn't exist.
1029 * DBMS_LDAP_UTL.MULTIPLE_SUBSCRIBER_ENTRIES - Multiple number of subscriber
1030 * DN entries exist in the
1032 * subscriber.
1033 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
1034 * DBMS_LDAP_UTL.ACCT_TOTALLY_LOCKED_EXCP - User account is locked.
1035 * DBMS_LDAP_UTL.AUTH_PASSWD_CHANGE_WARN - Password should be changed.
1036 * DBMS_LDAP_UTL.AUTH_FAILURE_EXCP - Authentication failed.
1037 * DBMS_LDAP_UTL.PWD_EXPIRED_EXCP - User password has expired.
1038 * DBMS_LDAP_UTL.PWD_GRACELOGIN_WARN - Grace login for User.
1039 * LDAP error codes - Returns proper DBMS_LDAP error
1040 * codes for unconditional
1041 * failures while carrying out
1042 * LDAP operations by the ldap
1043 * server.
1044 *
1045 * USAGE
1046 * This function can only be called after a valid
1047 * ldap session is obtained from a call to DBMS_LDAP.init().
1048 *
1049 * EXAMPLES
1050 *
1051 * SEE
1052 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
1053 *
1054 ****************************************************************************
1055 */
1056 FUNCTION authenticate_user( ld IN SESSION,
1057 user_handle IN HANDLE,
1058 auth_type IN PLS_INTEGER,
1059 credentials IN VARCHAR2,
1060 binary_credentials IN RAW)
1061 RETURN PLS_INTEGER;
1062
1063 /**
1064 *******************************************************************************
1065 * NAME
1066 * get_user_props_and_auth
1067 *
1068 * DESCRIPTION
1069 * This function Authenticates the user against OiD.
1070 *
1071 * SYNTAX
1072 * FUNCTION get_user_props_and_auth
1073 * (
1074 *
1075 * ld IN SESSION,
1076 * user_handle IN HANDLE,
1077 * auth_type IN PLS_INTEGER,
1078 * attrs IN STRING_COLLECTION,
1079 * credentials IN VARCHAR2,
1080 * binary_credentials IN RAW,
1081 * ret_pset_coll OUT PROPERTY_SET_COLLECTION
1082 *
1083 * )
1084 * RETURN PLS_INTEGER;
1085 *
1086 * REQUIRES
1087 * This function requires a valid ldap session handle which
1088 * has to be obtained from init() function.
1089 *
1090 * PARAMETERS
1091 * (SESSION ) ld - A valid ldap session handle.
1092 * (HANDLE ) user - User handle.
1093 * (PLS_INTEGER ) auth_type - Type of authentication,
1094 * Valid values are:
1095 * - DBMS_LDAP_UTL.AUTH_SIMPLE
1096 * (STRING_COLLECTION) attrs - List of required attributes
1097 * of user.
1098 * (VARCHAR2 ) credentials - The user credentials,
1099 * Valid values :
1100 * for DBMS_LDAP_UTL.AUTH_SIMPLE - password
1101 * (RAW ) binary_credentials - The binary credentials,
1102 * Valid values :
1103 * for DBMS_LDAP_UTL.AUTH_SIMPLE - NULL
1104 * (PROPERTY_SET_COLLECTION ) ret_pset_coll - The user details
1105 * containing the attributes
1106 * requested by the caller.
1107 *
1108 * RETURNS
1109 *
1110 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1111 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1112 * DBMS_LDAP_UTL.GENERAL_ERROR - Authentication failed.
1113 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
1114 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user DN
1115 * entries exist in the
1116 * directory for the given user.
1117 * DBMS_LDAP_UTL.INVALID_SUBSCRIBER_ORCL_CTX - Invalid Subscriber Oracle Context.
1118 * DBMS_LDAP_UTL.NO_SUCH_SUBSCRIBER - Subscriber doesn't exist.
1119 * DBMS_LDAP_UTL.MULTIPLE_SUBSCRIBER_ENTRIES - Multiple number of subscriber
1120 * DN entries exist in the
1121 * directory for the given
1122 * subscriber.
1123 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
1124 * DBMS_LDAP_UTL.ACCT_TOTALLY_LOCKED_EXCP - User account is locked.
1125 * DBMS_LDAP_UTL.AUTH_PASSWD_CHANGE_WARN - Password should be changed.
1126 * DBMS_LDAP_UTL.AUTH_FAILURE_EXCP - Authentication failed.
1127 * DBMS_LDAP_UTL.PWD_EXPIRED_EXCP - User password has expired.
1131 * failures while carrying out
1128 * DBMS_LDAP_UTL.PWD_GRACELOGIN_WARN - Grace login for User.
1129 * LDAP error codes - Returns proper DBMS_LDAP error
1130 * codes for unconditional
1132 * LDAP operations by the ldap
1133 * server.
1134 *
1135 * USAGE
1136 * This function can only be called after a valid
1137 * ldap session is obtained from a call to DBMS_LDAP.init().
1138 *
1139 * EXAMPLES
1140 *
1141 * SEE
1142 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
1143 *
1144 ****************************************************************************
1145 */
1146 FUNCTION get_user_props_and_auth( ld IN SESSION,
1147 user_handle IN HANDLE,
1148 auth_type IN PLS_INTEGER,
1149 attrs IN STRING_COLLECTION,
1150 credentials IN VARCHAR2,
1151 binary_credentials IN RAW,
1152 ret_pset_coll OUT PROPERTY_SET_COLLECTION)
1153 RETURN PLS_INTEGER;
1154
1155 /**
1156 *******************************************************************************
1157 * NAME
1158 * authenticate_user_ext
1159 *
1160 * DESCRIPTION
1161 * This function Authenticates the user against OiD.
1162 *
1163 * SYNTAX
1164 * FUNCTION authenticate_user_ext
1165 * (
1166 *
1167 * ld IN SESSION,
1168 * user_handle IN HANDLE,
1169 * auth_type IN PLS_INTEGER,
1170 * password_attr IN VARCHAR2,
1171 * password IN VARCHAR2,
1172 *
1173 * )
1174 * RETURN PLS_INTEGER;
1175 *
1176 * REQUIRES
1177 * This function requires a valid ldap session handle which
1178 * has to be obtained from init() function.
1179 *
1180 * PARAMETERS
1181 * (SESSION ) ld - A valid ldap session handle.
1182 * (HANDLE ) user - User handle.
1183 * (PLS_INTEGER ) auth_type - Type of authentication,
1184 * Valid values are:
1185 * - DBMS_LDAP_UTL.AUTH_EXTENDED
1186 * (VARCHAR2 ) password_attr - The password attribute
1187 * for comparision.
1188 * (VARCHAR2) password - User Credentials.
1189 *
1190 * RETURNS
1191 *
1192 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1193 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1194 * DBMS_LDAP_UTL.GENERAL_ERROR - Authentication failed.
1195 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
1196 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user DN
1197 * entries exist in the
1198 * directory for the given user.
1199 * DBMS_LDAP_UTL.INVALID_SUBSCRIBER_ORCL_CTX - Invalid Subscriber Oracle Context.
1200 * DBMS_LDAP_UTL.NO_SUCH_SUBSCRIBER - Subscriber doesn't exist.
1201 * DBMS_LDAP_UTL.MULTIPLE_SUBSCRIBER_ENTRIES - Multiple number of subscriber
1202 * DN entries exist in the
1203 * directory for the given
1204 * subscriber.
1205 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
1206 * DBMS_LDAP_UTL.ACCT_TOTALLY_LOCKED_EXCP - User account is locked.
1207 * DBMS_LDAP_UTL.AUTH_PASSWD_CHANGE_WARN - Password should be changed.
1208 * DBMS_LDAP_UTL.AUTH_FAILURE_EXCP - Authentication failed.
1209 * DBMS_LDAP_UTL.PWD_EXPIRED_EXCP - User password has expired.
1210 * DBMS_LDAP_UTL.PWD_GRACELOGIN_WARN - Grace login for User.
1211 * LDAP error codes - Returns proper DBMS_LDAP error
1212 * codes for unconditional
1213 * failures while carrying out
1214 * LDAP operations by the ldap
1215 * server.
1216 *
1217 * USAGE
1218 * This function can only be called after a valid
1219 * ldap session is obtained from a call to DBMS_LDAP.init().
1220 *
1221 * EXAMPLES
1222 *
1223 * SEE
1224 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
1225 *
1226 ****************************************************************************
1227 */
1228 FUNCTION authenticate_user_ext( ld IN SESSION,
1229 user_handle IN HANDLE,
1230 auth_type IN PLS_INTEGER,
1231 password_attr IN VARCHAR2,
1232 password IN VARCHAR2)
1233 RETURN PLS_INTEGER;
1234
1235 /**
1236 *******************************************************************************
1237 * NAME
1241 * This function returns the list of groups of which the user
1238 * get_group_membership
1239 *
1240 * DESCRIPTION
1242 * is a member.
1243 *
1244 * SYNTAX
1245 * FUNCTION get_group_membership
1246 * (
1247 *
1248 * ld IN SESSION,
1249 * user_handle IN HANDLE,
1250 * nested IN PLS_INTEGER,
1251 * attr_list IN STRING_COLLECTION,
1252 * ret_groups OUT PROPERTY_SET_COLLECTION,
1253 *
1254 * )
1255 * RETURN PLS_INTEGER;
1256 *
1257 * REQUIRES
1258 * This function requires a valid ldap session handle which
1259 * has to be obtained from DBMS_LDAP.init() function.
1260 *
1261 * PARAMETERS
1262 * (SESSION ) ld - LDAP session handle.
1263 * (HANDLE ) user_handle - User handle.
1264 * (PLS_INTEGER ) nested - Type of membership the
1265 * user holds in groups
1266 * valid values are :
1267 * DBMS_LDAP_UTL.NESTED_MEMBERSHIP
1268 * DBMS_LDAP_UTL.DIRECT_MEMBERSHIP
1269 * (STRING_COLLECTION ) attr_list - List of attributes to be
1270 * returned.
1271 * (PROPERTY_SET_COLLECTION ) ret_groups - Pointer to pointer to a
1272 * array of group entries.
1273 *
1274 * RETURNS
1275 *
1276 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1277 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1278 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
1279 *
1280 *
1281 * USAGE
1282 * This function can only be called after a valid
1283 * ldap session is obtained from a call to DBMS_LDAP.init().
1284 *
1285 * EXAMPLES
1286 *
1287 * SEE
1288 * DBMS_LDAP.init().
1289 *
1290 ******************************************************************************
1291 */
1292 FUNCTION get_group_membership ( ld IN SESSION,
1293 user_handle IN HANDLE,
1294 nested IN PLS_INTEGER,
1295 attr_list IN STRING_COLLECTION,
1296 ret_groups OUT PROPERTY_SET_COLLECTION)
1297 RETURN PLS_INTEGER;
1298 /**
1299 *******************************************************************************
1300 * NAME
1301 * free_handle
1302 *
1303 * DESCRIPTION
1304 * Frees the memory associated with the handle.
1305 *
1306 * SYNTAX
1307 * PROCEDURE free_handle
1308 * (
1309 *
1310 * handle IN OUT HANDLE
1311 *
1312 * );
1313 *
1314 * REQUIRES
1315 *
1316 * PARAMETERS
1317 * (HANDLE *) handle - Pointer to handle.
1318 *
1319 * RETURNS
1320 * NONE
1321 *
1322 *
1323 * USAGE
1324 * N/A
1325 *
1326 * EXAMPLES
1327 *
1328 * SEE
1329 * DBMS_LDAP_UTL.create_user_handle(), DBMS_LDAP_UTL.create_subscriber_handle(), DBMS_LDAP_UTL.create_group_handle().
1330 *
1331 ******************************************************************************
1332 */
1333 PROCEDURE free_handle ( handle IN OUT HANDLE);
1334
1335 /**
1336 *******************************************************************************
1337 * NAME
1338 * check_group_membership
1339 *
1340 * DESCRIPTION
1341 * This function checks the membership of the user to a group.
1342 *
1343 * SYNTAX
1344 * FUNCTION check_group_membership
1345 * (
1346 *
1347 * ld IN SESSION,
1348 * user_handle IN HANDLE,
1349 * group_handle IN HANDLE,
1350 * nested IN PLS_INTEGER
1351 *
1352 * )
1353 * RETURN PLS_INTEGER;
1354 *
1355 * REQUIRES
1356 * This function requires a valid ldap session handle which
1357 * has to be obtained from DBMS_LDAP.init() function.
1358 *
1359 * PARAMETERS
1360 * (SESSION ) ld - LDAP session handle.
1361 * (HANDLE ) user_handle - User handle.
1362 * (HANDLE ) group_handle - Group Handle.
1363 * (PLS_INTEGER ) nested - Type of membership the
1364 * user holds in groups
1365 * valid values are :
1366 * DBMS_LDAP_UTL.NESTED_MEMBERSHIP
1367 * DBMS_LDAP_UTL.DIRECT_MEMBERSHIP
1368 *
1369 * RETURNS
1370 *
1371 * DBMS_LDAP_UTL.SUCCESS - If user is a member.
1372 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1373 * DBMS_LDAP_UTL.NO_GROUP_MEMBERSHIP - If user is not a member.
1374 *
1375 *
1376 * USAGE
1377 * This function can only be called after a valid
1378 * ldap session is obtained from a call to DBMS_LDAP_UTL.init().
1379 *
1380 * EXAMPLES
1381 *
1382 * SEE
1383 * DBMS_LDAP_UTL.get_group_membership().
1384 *
1385 ******************************************************************************
1386 */
1387 FUNCTION check_group_membership( ld IN SESSION,
1391 RETURN PLS_INTEGER;
1388 user_handle IN HANDLE,
1389 group_handle IN HANDLE,
1390 nested IN PLS_INTEGER)
1392
1393 /**
1394 *******************************************************************************
1395 * NAME
1396 * get_property_names
1397 *
1398 * DESCRIPTION
1399 * Retrieves the list of property names in the propertyset.
1400 *
1401 * SYNTAX
1402 * FUNCTION get_property_names
1403 * (
1404 *
1405 * pset IN PROPERTY_SET,
1406 * property_names OUT STRING_COLLECTION
1407 *
1408 * )
1409 * RETURN PLS_INTEGER;
1410 *
1411 * REQUIRES
1412 *
1413 * PARAMETERS
1414 * (PROPERTY_SET ) pset - PropertySet in the PropertySet collection
1415 * returned from any of
1416 the following functions:
1417 * - DBMS_LDAP_UTL.get_group_membership()
1418 * - DBMS_LDAP_UTL.get_subscriber_properties()
1419 * - DBMS_LDAP_UTL.get_user_properties()
1420 * - DBMS_LDAP_UTL.get_group_properties()
1421 * (STRING_COLLECTION) property_names - List of Property Names associated
1422 * with PropertySet.
1423 *
1424 * RETURNS
1425 *
1426 * DBMS_LDAP_UTL.SUCCESS - On successful completion.
1427 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1428 * DBMS_LDAP_UTL.GENERAL_ERROR - On Error.
1429 *
1430 * USAGE
1431 * N/A
1432 *
1433 * EXAMPLES
1434 *
1435 * SEE
1436 * DBMS_LDAP_UTL.get_property_values().
1437 *
1438 ******************************************************************************
1439 */
1440 FUNCTION get_property_names( pset IN PROPERTY_SET,
1441 property_names OUT STRING_COLLECTION)
1442 RETURN PLS_INTEGER;
1443
1444 /**
1445 *******************************************************************************
1446 * NAME
1447 * get_property_values
1448 *
1449 * DESCRIPTION
1450 * Retrieves the property values(strings) for a given property name
1451 * and property.
1452 *
1453 * SYNTAX
1454 * FUNCTION get_property_values
1455 * (
1456 *
1457 * pset IN PROPERTY_SET,
1458 * property_name IN VARCHAR2,
1459 * property_values OUT STRING_COLLECTION
1460 *
1461 * )
1462 * RETURN PLS_INTEGER;
1463 *
1464 * REQUIRES
1465 *
1466 * PARAMETERS
1467 * (VARCHAR2 ) property_name - Property name.
1468 * (PROPERTY_SET ) pset - PropertySet in PropertySet Collection obtained from
1469 * any of the following function returns:
1470 * - DBMS_LDAP_UTL.get_group_membership()
1471 * - DBMS_LDAP_UTL.get_subscriber_properties()
1472 * - DBMS_LDAP_UTL.get_user_properties()
1473 * - DBMS_LDAP_UTL.get_group_properties()
1474 * (STRING_COLLECTION ) property_values - List of property values(strings).
1475 *
1476 * RETURNS
1477 *
1478 * DBMS_LDAP_UTL.SUCCESS - On successful completion.
1479 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1480 * DBMS_LDAP_UTL.GENERAL_ERROR - On failure.
1481 *
1482 *
1483 * USAGE
1484 * N/A
1485 *
1486 * EXAMPLES
1487 *
1488 * SEE
1489 * DBMS_LDAP_UTL.get_property_values_len().
1490 *
1491 ******************************************************************************
1492 */
1493 FUNCTION get_property_values(pset IN PROPERTY_SET,
1494 property_name IN VARCHAR2,
1495 property_values OUT STRING_COLLECTION)
1496 RETURN PLS_INTEGER;
1497
1498 /**
1499 *******************************************************************************
1500 * NAME
1501 * get_property_values_len
1502 *
1503 * DESCRIPTION
1504 * Retrieves the binary property values for a given property name
1505 * and property.
1506 *
1507 * SYNTAX
1508 * FUNCTION get_property_values_len
1509 * (
1510 *
1511 * pset IN PROPERTY_SET,
1512 * property_name IN VARCHAR2,
1513 * property_values OUT BINVAL_COLLECTION
1514 *
1515 * )
1516 * RETURN PLS_INTEGER;
1517 *
1518 * REQUIRES
1519 *
1520 * PARAMETERS
1521 * (VARCHAR2 ) property_name - Property name.
1522 * (PROPERTY_SET ) pset - PropertySet in PropertySet Collection obtained from
1523 * any of the following function returns:
1524 * - DBMS_LDAP_UTL.get_group_membership()
1525 * - DBMS_LDAP_UTL.get_subscriber_properties()
1526 * - DBMS_LDAP_UTL.get_user_properties()
1527 * - DBMS_LDAP_UTL.get_group_properties()
1531 *
1528 * (BINVAL_COLLECTION ) property_values - List of binary property values.
1529 *
1530 * RETURNS
1532 * DBMS_LDAP_UTL.SUCCESS - On successful completion.
1533 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1534 * DBMS_LDAP_UTL.GENERAL_ERROR - On failure.
1535 *
1536 *
1537 * USAGE
1538 * N/A
1539 *
1540 * EXAMPLES
1541 *
1542 * SEE
1543 * DBMS_LDAP_UTL.get_property_values().
1544 *
1545 ******************************************************************************
1546 */
1547 FUNCTION get_property_values_len(pset IN PROPERTY_SET,
1548 property_name IN VARCHAR2,
1549 property_values OUT BINVAL_COLLECTION)
1550 RETURN PLS_INTEGER;
1551
1552 /**
1553 *******************************************************************************
1554 * NAME
1555 * get_property_values_blob
1556 *
1557 * DESCRIPTION
1558 * Retrieves the binary property values for a given property name
1559 * and property.
1560 *
1561 * SYNTAX
1562 * FUNCTION get_property_values_blob
1563 * (
1564 *
1565 * pset IN PROPERTY_SET,
1566 * property_name IN VARCHAR2,
1567 * property_values OUT BLOB_COLLECTION
1568 *
1569 * )
1570 * RETURN PLS_INTEGER;
1571 *
1572 * REQUIRES
1573 *
1574 * PARAMETERS
1575 * (VARCHAR2 ) property_name - Property name.
1576 * (PROPERTY_SET ) pset - PropertySet in PropertySet Collection obtained from
1577 * any of the following function returns:
1578 * - DBMS_LDAP_UTL.get_group_membership()
1579 * - DBMS_LDAP_UTL.get_subscriber_properties()
1580 * - DBMS_LDAP_UTL.get_user_properties()
1581 * - DBMS_LDAP_UTL.get_group_properties()
1582 * (BLOB_COLLECTION ) property_values - List of binary property values.
1583 *
1584 * RETURNS
1585 *
1586 * DBMS_LDAP_UTL.SUCCESS - On successful completion.
1587 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1588 * DBMS_LDAP_UTL.GENERAL_ERROR - On failure.
1589 *
1590 *
1591 * USAGE
1592 * N/A
1593 *
1594 * EXAMPLES
1595 *
1596 * SEE
1597 * DBMS_LDAP_UTL.get_property_values().
1598 *
1599 ******************************************************************************
1600 */
1601 FUNCTION get_property_values_blob(pset IN PROPERTY_SET,
1602 property_name IN VARCHAR2,
1603 property_values OUT BLOB_COLLECTION)
1604 RETURN PLS_INTEGER;
1605
1606 /**
1607 *******************************************************************************
1608 * NAME
1609 * property_value_free_blob
1610 *
1611 * DESCRIPTION
1612 * Frees the property value memory
1613 *
1614 * SYNTAX
1615 * PROCEDURE property_value_free_blob
1616 * (
1617 *
1618 * vals IN OUT BLOB_COLLECTION
1619 *
1620 * );
1621 *
1622 * REQUIRES
1623 *
1624 * PARAMETERS
1625 * (BLOB_COLLECTION ) vals - Property values obtained from
1626 * get_property_values_len
1627 *
1628 * RETURNS
1629 *
1630 * DBMS_LDAP_UTL.SUCCESS - On successful completion.
1631 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
1632 * DBMS_LDAP_UTL.GENERAL_ERROR - On failure.
1633 *
1634 *
1635 * USAGE
1636 * N/A
1637 *
1638 * EXAMPLES
1639 *
1640 * SEE
1641 * DBMS_LDAP_UTL.get_property_values_len().
1642 *
1643 ******************************************************************************
1644 */
1645 PROCEDURE property_value_free_blob(vals IN OUT BLOB_COLLECTION);
1646
1647 /**
1648 *******************************************************************************
1649 * NAME
1650 * locate_subscriber_for_user
1651 *
1652 * DESCRIPTION
1653 * Retrieves the subsciber for the given user and returns a handle to it.
1654 *
1655 * SYNTAX
1656 * FUNCTION locate_subscriber_for_user
1657 * (
1658 *
1659 * ld IN SESSION,
1660 * user_handle IN HANDLE,
1661 * subscriber_handle OUT HANDLE
1662 *
1663 * )
1664 * RETURN PLS_INTEGER
1665 *
1666 * REQUIRES
1667 * This function requires a valid ldap session handle which
1668 * has to be obtained from ldap_init() function.
1669 *
1670 * PARAMETERS
1671 * (SESSION ) ld - A valid ldap session handle.
1672 * (HANDLE ) user_handle - The user handle
1673 * (HANDLE ) subscriber_handle - The subscriber handle.
1674
1675 * RETURNS
1676 *
1677 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1678 * DBMS_LDAP_UTL.NO_SUCH_SUBSCRIBER - Subscriber doesn't exist.
1679 * DBMS_LDAP_UTL.MULTIPLE_SUBSCRIBER_ENTRIES - Multiple number of subscriber
1683 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
1680 * DN entries exist in the
1681 * directory for the given
1682 * subscriber.
1684 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user
1685 * DN entries exist in the
1686 * directory for the given
1687 * user.
1688 * DBMS_LDAP_UTL.SUBSCRIBER_NOT_FOUND - Unable to locate subscriber
1689 * for the given user.
1690 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
1691 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
1692 * LDAP error codes - Returns proper LDAP error codes
1693 * for unconditional failures
1694 * while carrying out
1695 * LDAP operations by the ldap
1696 * server.
1697 *
1698 *
1699 * USAGE
1700 * This function can only be called after a valid
1701 * ldap session is obtained from a call to ldap_init().
1702 *
1703 * EXAMPLES
1704 *
1705 * SEE
1706 * DBMS_LDAP.init(), DBMS_LDAP_UTL.create_user_handle().
1707 *
1708 ******************************************************************************
1709 */
1710 FUNCTION locate_subscriber_for_user ( ld IN SESSION,
1711 user_handle IN HANDLE,
1712 subscriber_handle OUT HANDLE)
1713
1714 RETURN PLS_INTEGER;
1715
1716 /**
1717 *******************************************************************************
1718 * NAME
1719 * set_user_properties
1720 *
1721 * DESCRIPTION
1722 * Modifies the properties of a user.
1723 *
1724 * SYNTAX
1725 * FUNCTION set_user_properties
1726 * (
1727 *
1728 * ld IN SESSION,
1729 * user_handle IN HANDLE,
1730 * pset_type IN PLS_INTEGER,
1731 * mod_pset IN PROPERTY_SET,
1732 * mod_op IN PLS_INTEGER
1733 *
1734 * )
1735 * RETURN PLS_INTEGER
1736 *
1737 * REQUIRES
1738 * This function requires a valid ldap session handle which
1739 * has to be obtained from ldap_init() function.
1740 *
1741 * PARAMETERS
1742 * (SESSION ) ld - A valid ldap session handle.
1743 * (HANDLE ) user_handle - The user handle
1744 * (PLS_INTEGER) pset_type - Type of PropertySet being
1745 * Modified:
1746 * Valid Values:
1747 * - ENTRY_PROPERTIES
1748 * (PROPERTY_SET) mod_pset - Data Structure containing
1749 * Modify operations to be
1750 * performed on PropertySet.
1751 * (PLS_INTEGER) mod_op - Type of Modify operation to be
1752 * performed on the PropertySet:
1753 * Valid Values are:
1754 * - ADD_PROPERTYSET
1755 * - MODIFY_PROPERTYSET
1756 * - DELETE_PROPERTYSET
1757 *
1758 * RETURNS
1759 *
1760 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1761 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
1762 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user
1763 * DN entries exist in the
1764 * directory for the given
1765 * user.
1766 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
1767 * DBMS_LDAP_UTL.PWD_MIN_LENGTH_ERROR - Password length is less
1768 * than minimum required
1769 * length.
1770 * DBMS_LDAP_UTL.PWD_NUMERIC_ERROR - Password must contain
1771 * numeric characters.
1772 * DBMS_LDAP_UTL.PWD_NULL_ERROR - Password cannot be NULL.
1773 * DBMS_LDAP_UTL.PWD_INHISTORY_ERROR - Password cannot not be
1774 * the same as the one
1775 * that is being replaced.
1776 * DBMS_LDAP_UTL.PWD_ILLEGALVALUE_ERROR - Password contains
1777 * illegal characters.
1778 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
1779 * LDAP error codes - Returns proper LDAP error codes
1780 * for unconditional failures
1781 * while carrying out
1782 * LDAP operations by the ldap
1783 * server.
1784 *
1785 *
1786 * USAGE
1790 *
1787 * This function can only be called after a valid
1788 * ldap session is obtained from a call to ldap_init().
1789 *
1791 * EXAMPLES
1792 *
1793 * SEE
1794 * DBMS_LDAP.init(), DBMS_LDAP_UTL.get_user_properties().
1795 *
1796 ******************************************************************************
1797 */
1798 FUNCTION set_user_properties ( ld IN SESSION,
1799 user_handle IN HANDLE,
1800 pset_type IN PLS_INTEGER,
1801 mod_pset IN PROPERTY_SET,
1802 mod_op IN PLS_INTEGER)
1803 RETURN PLS_INTEGER;
1804
1805 /**
1806 *******************************************************************************
1807 * NAME
1808 * create_mod_propertyset
1809 *
1810 * DESCRIPTION
1811 * Creates a MOD_PROPERTY_SET data structure.
1812 *
1813 * SYNTAX
1814 * FUNCTION create_mod_propertyset
1815 * (
1816 *
1817 * pset_type IN PLS_INTEGER,
1818 * pset_name IN VARCHAR2,
1819 * mod_pset OUT MOD_PROPERTY_SET
1820 *
1821 * )
1822 * RETURN PLS_INTEGER
1823 *
1824 * REQUIRES
1825 * This function requires a valid ldap session handle which
1826 * has to be obtained from ldap_init() function.
1827 *
1828 * PARAMETERS
1829 * (PLS_INTEGER) pset_type - Type of PropertySet being
1830 * Modified:
1831 * Valid Values:
1832 * - ENTRY_PROPERTIES
1833 * (VARCHAR2) pset_name - Name of PropertySet.
1834 * This can be NULL if
1835 * ENTRY_PROPERTIES are being
1836 * modified.
1837 * (MOD_PROPERTY_SET) mod_pset - Data Structure to contain
1838 * Modify operations to be
1839 * performed on PropertySet.
1840 * RETURNS
1841 *
1842 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1843 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
1844 *
1845 *
1846 * USAGE
1847 * N/A
1848 *
1849 * EXAMPLES
1850 *
1851 * SEE
1852 * DBMS_LDAP_UTL.populate_mod_propertyset().
1853 *
1854 ******************************************************************************
1855 */
1856 FUNCTION create_mod_propertyset ( pset_type IN PLS_INTEGER,
1857 pset_name IN VARCHAR2,
1858 mod_pset OUT MOD_PROPERTY_SET)
1859 RETURN PLS_INTEGER;
1860
1861 /**
1862 *******************************************************************************
1863 * NAME
1864 * populate_mod_propertyset
1865 *
1866 * DESCRIPTION
1867 * Populates the MOD_PROPERTY_SET data structure.
1868 *
1869 * SYNTAX
1870 * FUNCTION populate_mod_propertyset
1871 * (
1872 *
1873 * mod_pset IN MOD_PROPERTY_SET,
1874 * property_mod_op IN PLS_INTEGER,
1875 * property_name IN VARCHAR2,
1876 * property_values IN STRING_COLLECTION
1877 *
1878 * )
1879 * RETURN PLS_INTEGER
1880 *
1881 * REQUIRES
1882 * This function requires a valid ldap session handle which
1883 * has to be obtained from ldap_init() function.
1884 *
1885 * PARAMETERS
1886 * (MOD_PROPERTY_SET) mod_pset - Mod-PropertySet data structure.
1887 * (PLS_INTEGER) property_mod_op - Type of Modify operation
1888 * to be performed on a Property.
1889 * Valid Values:
1890 * - ADD_PROPERTY
1891 * - REPLACE_PROPERTY
1892 * - DELETE_PROPERTY
1893 * (VARCHAR2) property_name - Name of the Property.
1894 * (STRING_COLLECTION) propery_values - Values associated to the
1895 * Property.
1896 *
1897 * RETURNS
1898 *
1899 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1900 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
1901 *
1902 *
1903 * USAGE
1904 * N/A
1905 *
1906 *
1907 * EXAMPLES
1908 *
1909 * SEE
1910 * DBMS_LDAP_UTL.create_mod_propertyset().
1911 *
1912 ******************************************************************************
1913 */
1914 FUNCTION populate_mod_propertyset ( mod_pset IN MOD_PROPERTY_SET,
1915 property_mod_op IN PLS_INTEGER,
1916 property_name IN VARCHAR2,
1917 property_values IN STRING_COLLECTION)
1918 RETURN PLS_INTEGER;
1919
1920 /**
1921 *******************************************************************************
1922 * NAME
1923 * free_mod_propertyset
1924 *
1925 * DESCRIPTION
1926 * Frees the MOD_PROPERTY_SET data structure.
1930 * (
1927 *
1928 * SYNTAX
1929 * PROCEDURE free_mod_propertyset
1931 *
1932 * mod_pset IN MOD_PROPERTY_SET
1933 *
1934 * );
1935 *
1936 * REQUIRES
1937 * NONE
1938 *
1939 * PARAMETERS
1940 * (PROPERTY_SET) mod_pset - Mod-PropertySet data structure.
1941 *
1942 * RETURNS
1943 *
1944 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
1945 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
1946 *
1947 *
1948 * USAGE
1949 * N/A
1950 *
1951 * EXAMPLES
1952 *
1953 * SEE
1954 * DBMS_LDAP_UTL.create_mod_propertyset().
1955 *
1956 ******************************************************************************
1957 */
1958 PROCEDURE free_mod_propertyset ( mod_pset IN OUT MOD_PROPERTY_SET);
1959
1960 /**
1961 *******************************************************************************
1962 * NAME
1963 * get_user_extended_properties
1964 *
1965 * DESCRIPTION
1966 * Retrives user extended Properties.
1967 *
1968 * SYNTAX
1969 * FUNCTION get_user_extended_properties
1970 * (
1971 *
1972 * ld IN SESSION,
1973 * user_handle IN HANDLE,
1974 * attrs IN STRING_COLLECTION,
1975 * ptype IN PLS_INTEGER,
1976 * filter IN VARCHAR2,
1977 * ret_pset_coll OUT PROPERTY_SET_COLLECTION
1978 *
1979 * )
1980 * RETURN PLS_INTEGER;
1981 *
1982 * REQUIRES
1983 * This function requires a valid ldap session handle which
1984 * has to be obtained from ldap_init() function.
1985 *
1986 * PARAMETERS
1987 * (SESSION ) ld - A valid ldap session handle.
1988 * (HANDLE ) user_handle - The user handle
1989 * (STRING_COLLECTION ) attrs - List of Attributes that
1990 * need to be fetched for
1991 * the user.
1992 * (PLS_INTEGER ) ptype - Type of properties to be
1993 * returned.
1994 * Valid values:
1995 * - DBMS_LDAP_UTL.EXTPROPTYPE_RAD
1996 * (VARCHAR2) filter - Ldap filter to further
1997 * refine the user properties
1998 * returned by function.
1999 * (PROPERTY_SET_COLLECTION ) ret_pset_collection - The user details
2000 * containing the requested
2001 * attributes by the caller.
2002 *
2003 * RETURNS
2004 *
2005 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2006 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2007 * DBMS_LDAP_UTL.NO_SUCH_USER - User doesn't exist.
2008 * DBMS_LDAP_UTL.MULTIPLE_USER_ENTRIES - Multiple number of user
2009 * DN entries exist in the
2010 * directory for the given
2011 * user.
2012 * USER_PROPERTY_NOT_FOUND - User Extended Property
2013 * doesn't exist.
2014 * DBMS_LDAP_UTL.INVALID_ROOT_ORCL_CTX - Invalid Root Oracle Context.
2015 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2016 * DBMS_LDAP error codes - Returns proper LDAP error codes
2017 * for unconditional failures
2018 * while carrying out
2019 * LDAP operations by the ldap
2020 * server.
2021 *
2022 * USAGE
2023 * This function can only be called after a valid
2024 * ldap session is obtained from a call to DBMS_LDAP.init().
2025 *
2026 * EXAMPLES
2027 *
2028 * SEE
2029 * DBMS_LDAP.init(), DBMS_LDAP_UTL.get_user_properties().
2030 *
2031 ******************************************************************************
2032 */
2033 FUNCTION get_user_extended_properties ( ld IN SESSION,
2034 user_handle IN HANDLE,
2035 attrs IN STRING_COLLECTION,
2036 ptype IN PLS_INTEGER,
2037 filter IN VARCHAR2,
2038 ret_pset_coll OUT PROPERTY_SET_COLLECTION)
2039 RETURN PLS_INTEGER;
2040
2041 /**
2042 *******************************************************************************
2043 * NAME
2044 * normalize_dn_with_case
2045 *
2046 * DESCRIPTION
2047 * Normalizes the given DN.
2048 *
2049 * SYNTAX
2050 * FUNCTION normalize_dn_with_case
2051 * (
2052 *
2053 * dn IN VARCHAR2,
2054 * lower_case IN PLS_INTEGER,
2055 * norm_dn OUT VARCHAR2
2056 *
2057 * )
2058 * RETURN PLS_INTEGER;
2059 *
2060 * REQUIRES
2061 *
2065 * normalized DN would
2062 * PARAMETERS
2063 * (VARCHAR2 ) dn - DN.
2064 * (PLS_INTEGER ) lower_case - If set to 1 : The
2066 * be returned in
2067 * lower case.
2068 * If set to 0 : The case
2069 * would be preserved
2070 * in the normalized
2071 * DN string.
2072 *
2073 * (VARCHAR2 ) norm_dn - Normalized DN.
2074 *
2075 * RETURNS
2076 *
2077 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2078 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2079 * DBMS_LDAP_UTL.GENERAL_ERROR - On failure.
2080 *
2081 * USAGE
2082 * N/A
2083 *
2084 * EXAMPLES
2085 *
2086 * SEE
2087 * N/A
2088 *
2089 ****************************************************************************
2090 */
2091 FUNCTION normalize_dn_with_case ( dn IN VARCHAR2,
2092 lower_case IN PLS_INTEGER,
2093 norm_dn OUT VARCHAR2)
2094 RETURN PLS_INTEGER;
2095
2096 /**
2097 *******************************************************************************
2098 * NAME
2099 * create_service_handle
2100 *
2101 * DESCRIPTION
2102 * This function creates a service handle.
2103 *
2104 * SYNTAX
2105 * FUNCTION create_service_handle
2106 * (
2107 *
2108 * service_handle OUT HANDLE,
2109 * service_type IN PLS_INTEGER,
2110 * service_id IN VARCHAR2
2111 *
2112 * )
2113 * RETURN PLS_INTEGER;
2114 *
2115 * REQUIRES
2116 *
2117 * PARAMETERS
2118 * (HANDLE ) service_handle - A pointer to a handle to
2119 * service.
2120 * (PLS_INTEGER ) service_type - The type of service id that
2121 * is passed.
2122 * Valid values for this argument are:
2123 * - DBMS_LDAP_UTL.TYPE_DN
2124 * (VARCHAR2 ) service_id - The service id representing
2125 * the service entry.
2126 *
2127 * RETURNS
2128 *
2129 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2130 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2131 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2132 *
2133 *
2134 * USAGE
2135 * N/A
2136 *
2137 * EXAMPLES
2138 *
2139 * SEE
2140 * DBMS_LDAP_UTL.get_subscribed_users().
2141 *
2142 ******************************************************************************
2143 */
2144 FUNCTION create_service_handle ( service_handle OUT HANDLE,
2145 service_type IN PLS_INTEGER,
2146 service_id IN VARCHAR2)
2147 RETURN PLS_INTEGER;
2148
2149 /**
2150 *******************************************************************************
2151 * NAME
2152 * get_subscribed_users
2153 *
2154 * DESCRIPTION
2155 * This function retrieves all the users subscribed to a service.
2156 *
2157 * SYNTAX
2158 * FUNCTION get_subscribed_users
2159 * (
2160 *
2161 * ld IN SESSION,
2162 * service_handle IN HANDLE,
2163 * users OUT STRING_COLLECTION
2164 *
2165 * )
2166 * RETURN PLS_INTEGER;
2167 *
2168 * REQUIRES
2169 *
2170 * PARAMETERS
2171 *
2172 * (SESSION ) ld - A valid ldap session handle.
2173 *
2174 * (HANDLE ) service_handle - A pointer to a handle to
2175 * service.
2176 * (STRING_COLLECTION ) users - List of users subscribed to a service.
2177 *
2178 * RETURNS
2179 *
2180 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2181 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2182 * DBMS_LDAP_UTL.NO_SUCH_SERVICE - Service doesn't exist.
2183 * DBMS_LDAP_UTL.NO_USER_SUBSCRIPTIONS - No users have been
2184 * subscribed for this
2185 * service.
2186 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2187 *
2188 *
2189 * USAGE
2190 * N/A
2191 *
2192 * EXAMPLES
2193 *
2194 * SEE
2195 * DBMS_LDAP_UTL.check_user_subscription(), DBMS_LDAP_UTL.subscribe_user(), DBMS_LDAP_UTL.unsubscribe_user().
2196 *
2197 ******************************************************************************
2198 */
2199 FUNCTION get_subscribed_users ( ld IN SESSION,
2200 service_handle IN HANDLE,
2204 /**
2201 users OUT STRING_COLLECTION)
2202 RETURN PLS_INTEGER;
2203
2205 *******************************************************************************
2206 * NAME
2207 * get_subscribed_services
2208 *
2209 * DESCRIPTION
2210 * This function retrieves all the services to which a user is subscribed.
2211 *
2212 * SYNTAX
2213 * FUNCTION get_subscribed_services
2214 * (
2215 *
2216 * ld IN SESSION,
2217 * user_handle IN HANDLE,
2218 * services OUT STRING_COLLECTION
2219 *
2220 * )
2221 * RETURN PLS_INTEGER;
2222 *
2223 * REQUIRES
2224 *
2225 * PARAMETERS
2226 *
2227 * (SESSION ) ld - A valid ldap session handle.
2228 *
2229 * (HANDLE ) user_handle - A pointer to a handle to
2230 * user.
2231 * (STRING_COLLECTION ) services - List of services to which a user is subscribed.
2232 *
2233 * RETURNS
2234 *
2235 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2236 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2237 * DBMS_LDAP_UTL.NO_SUBSCRIPTIONS_TO_SERVICES - User hasen't been
2238 * subscribed to any
2239 * services.
2240 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2241 *
2242 *
2243 * USAGE
2244 * N/A
2245 *
2246 * EXAMPLES
2247 *
2248 * SEE
2249 * DBMS_LDAP_UTL.get_available_services().
2250 *
2251 ******************************************************************************
2252 */
2253 FUNCTION get_subscribed_services ( ld IN SESSION,
2254 user_handle IN HANDLE,
2255 services OUT STRING_COLLECTION)
2256 RETURN PLS_INTEGER;
2257
2258 /**
2259 *******************************************************************************
2260 * NAME
2261 * get_available_services
2262 *
2263 * DESCRIPTION
2264 * This function retrieves all the Distinguished Names of services under
2265 * a subscriber.
2266 *
2267 * SYNTAX
2268 * FUNCTION get_available_services
2269 * (
2270 *
2271 * ld IN SESSION,
2272 * subscriber_handle IN HANDLE,
2273 * services OUT STRING_COLLECTION
2274 *
2275 * )
2276 * RETURN PLS_INTEGER;
2277 *
2278 * REQUIRES
2279 *
2280 * PARAMETERS
2281 * (SESSION ) ld - A valid ldap session handle.
2282 * (HANDLE ) subscriber_handle - A pointer to a handle to
2283 * subscriber.
2284 * (STRING_COLLECTION ) services - List of services under a subscriber.
2285 *
2286 * RETURNS
2287 *
2288 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2289 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2290 * DBMS_LDAP_UTL.NO_SERVICES_INSTALLED - No services are
2291 * available for this
2292 * Subscriber.
2293 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2294 *
2295 *
2296 * USAGE
2297 * N/A
2298 *
2299 * EXAMPLES
2300 *
2301 * SEE
2302 * DBMS_LDAP_UTL.get_subscribed_services().
2303 *
2304 ******************************************************************************
2305 */
2306 FUNCTION get_available_services ( ld IN SESSION,
2307 subscriber_handle IN HANDLE,
2308 services OUT STRING_COLLECTION)
2309 RETURN PLS_INTEGER;
2310
2311 /**
2312 *******************************************************************************
2313 * NAME
2314 * check_user_subscription
2315 *
2316 * DESCRIPTION
2317 * This function checks if a user is subscribed to a service.
2318 *
2319 * SYNTAX
2320 * FUNCTION check_user_subscription
2321 * (
2322 *
2323 * ld IN SESSION,
2324 * user_handle IN HANDLE,
2325 * service_handle IN HANDLE
2326 *
2327 * )
2328 * RETURN PLS_INTEGER;
2329 *
2330 * REQUIRES
2331 *
2332 * PARAMETERS
2333 *
2334 * (SESSION ) ld - A valid ldap session handle.
2335 *
2336 * (HANDLE ) user_handle - A pointer to a handle to
2337 * user.
2338 * (HANDLE ) service_handle - A pointer to a handle to
2339 * service.
2340 *
2341 * RETURNS
2342 *
2343 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2344 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2345 * DBMS_LDAP_UTL.USER_NOT_SUBSCRIBED - User is not subscribed
2346 * to the Service.
2347 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2348 *
2349 *
2350 * USAGE
2351 * N/A
2352 *
2353 * EXAMPLES
2354 *
2355 * SEE
2359 */
2356 * DBMS_LDAP_UTL.subscribe_user(), DBMS_LDAP_UTL.unsubscribe_user().
2357 *
2358 ******************************************************************************
2360 FUNCTION check_user_subscription ( ld IN SESSION,
2361 user_handle IN HANDLE,
2362 service_handle IN HANDLE)
2363 RETURN PLS_INTEGER;
2364
2365 /**
2366 *******************************************************************************
2367 * NAME
2368 * subscribe_user
2369 *
2370 * DESCRIPTION
2371 * This function subscribes a user to a service.
2372 *
2373 * SYNTAX
2374 * FUNCTION subscribe_user
2375 * (
2376 *
2377 * ld IN SESSION,
2378 * user_handle IN HANDLE,
2379 * service_handle IN HANDLE
2380 *
2381 * )
2382 * RETURN PLS_INTEGER;
2383 *
2384 * REQUIRES
2385 *
2386 * PARAMETERS
2387 *
2388 * (SESSION ) ld - A valid ldap session handle.
2389 *
2390 * (HANDLE ) user_handle - A pointer to a handle to
2391 * user.
2392 * (HANDLE ) service_handle - A pointer to a handle to
2393 * service.
2394 *
2395 * RETURNS
2396 *
2397 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2398 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2399 * DBMS_LDAP_UTL.INVALID_SERVICE_SCHEMA - Unable to subscribe
2400 * the user due to
2401 * invalid service schema
2402 * in Subscriber Oracle
2403 * Context.
2404 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2405 *
2406 *
2407 * USAGE
2408 * N/A
2409 *
2410 * EXAMPLES
2411 *
2412 * SEE
2413 * DBMS_LDAP_UTL.unsubscribe_user(), DBMS_LDAP_UTL.check_user_subscription().
2414 *
2415 ******************************************************************************
2416 */
2417 FUNCTION subscribe_user ( ld IN SESSION,
2418 user_handle IN HANDLE,
2419 service_handle IN HANDLE)
2420 RETURN PLS_INTEGER;
2421
2422 /**
2423 *******************************************************************************
2424 * NAME
2425 * unsubscribe_user
2426 *
2427 * DESCRIPTION
2428 * This function unsubscribes a user from a service.
2429 *
2430 * SYNTAX
2431 * FUNCTION unsubscribe_user
2432 * (
2433 *
2434 * ld IN SESSION,
2435 * user_handle IN HANDLE,
2436 * service_handle IN HANDLE
2437 *
2438 * )
2439 * RETURN PLS_INTEGER;
2440 *
2441 * REQUIRES
2442 *
2443 * PARAMETERS
2444 *
2445 * (SESSION ) ld - A valid ldap session handle.
2446 *
2447 * (HANDLE ) user_handle - A pointer to a handle to
2448 * user.
2449 * (HANDLE ) service_handle - A pointer to a handle to
2450 * service.
2451 *
2452 * RETURNS
2453 *
2454 * DBMS_LDAP_UTL.SUCCESS - On a successful completion.
2455 * DBMS_LDAP_UTL.PARAM_ERROR - Invalid input parameters.
2456 * DBMS_LDAP_UTL.GENERAL_ERROR - Other Error
2457 *
2458 *
2459 * USAGE
2460 * N/A
2461 *
2462 * EXAMPLES
2463 *
2464 * SEE
2465 * DBMS_LDAP_UTL.subscribe_user().
2466 *
2467 ******************************************************************************
2468 */
2469 FUNCTION unsubscribe_user ( ld IN SESSION,
2470 user_handle IN HANDLE,
2471 service_handle IN HANDLE)
2472 RETURN PLS_INTEGER;
2473
2474 -- Error Code Constants
2475
2476 -- Except for DBMS_LDAP_UTL.SUCCESS all error codes are negative,
2477 -- (this is to distinguish them from DBMS_LDAP error codes)
2478
2479 -- Successful completion
2480 SUCCESS CONSTANT NUMBER := 0;
2481
2482 -- Other error
2483 GENERAL_ERROR CONSTANT NUMBER := -1;
2484
2485 -- Invalid input parameters.
2486 PARAM_ERROR CONSTANT NUMBER := -2;
2487
2488 -- User doesn't have any group membership.
2489 NO_GROUP_MEMBERSHIP CONSTANT NUMBER := -3;
2490
2491 -- SUBSCRIBER doesn't exist.
2492 NO_SUCH_SUBSCRIBER CONSTANT NUMBER := -4;
2493
2494 -- User DN doesn't exist.
2495 NO_SUCH_USER CONSTANT NUMBER := -5;
2496
2497 -- Root oracle context doesn't exist.
2498 NO_ROOT_ORCL_CTX CONSTANT NUMBER := -6;
2499
2500 -- More than one SUBSCRIBER entries
2501 MULTIPLE_SUBSCRIBER_ENTRIES CONSTANT NUMBER := -7;
2502
2503 -- Root oracle context
2504 -- either doesn't contain
2505 -- all the required attributes and entries
2506 -- or
2507 -- does not have valid attribute values.
2508 INVALID_ROOT_ORCL_CTX CONSTANT NUMBER := -8;
2509
2513 -- Subscriber's oracle context
2510 -- SUBSCRIBER's oracle context dosen't exist.
2511 NO_SUBSCRIBER_ORCL_CTX CONSTANT NUMBER := -9;
2512
2514 -- either doesn't contain
2515 -- all the required attributes and entries
2516 -- or
2517 -- does not have valid attribute values.
2518 INVALID_SUBSCRIBER_ORCL_CTX CONSTANT NUMBER := -10;
2519
2520 -- More than one SUBSCRIBER entries
2521 MULTIPLE_USER_ENTRIES CONSTANT NUMBER := -11;
2522
2523 -- GROUP does not exist.
2524 NO_SUCH_GROUP CONSTANT NUMBER := -12;
2525
2526 -- Multiple group entries.
2527 MULTIPLE_GROUP_ENTRIES CONSTANT NUMBER := -13;
2528
2529 -- Password Policy Error Codes
2530
2531 AUTH_FAILURE_EXCEPTION CONSTANT NUMBER := -16;
2532
2533 -- Error Codes Returned by Server.
2534 ACCT_TOTALLY_LOCKED_EXCEPTION CONSTANT NUMBER := 9001;
2535 PWD_EXPIRED_EXCEPTION CONSTANT NUMBER := 9000;
2536 PWD_EXPIRE_WARN CONSTANT NUMBER := 9002;
2537 PWD_MINLENGTH_ERROR CONSTANT NUMBER := 9003;
2538 PWD_NUMERIC_ERROR CONSTANT NUMBER := 9004;
2539 PWD_NULL_ERROR CONSTANT NUMBER := 9005;
2540 PWD_INHISTORY_ERROR CONSTANT NUMBER := 9006;
2541 PWD_ILLEGALVALUE_ERROR CONSTANT NUMBER := 9007;
2542 PWD_GRACELOGIN_WARN CONSTANT NUMBER := 9008;
2543 PWD_MUSTCHANGE_ERROR CONSTANT NUMBER := 9009;
2544 USER_ACCT_DISABLED_ERROR CONSTANT NUMBER := 9050;
2545
2546 -- Deprecated
2547 AUTH_PASSWD_CHANGE_WARN CONSTANT NUMBER := -15;
2548
2549 RESET_HANDLE CONSTANT NUMBER := -18;
2550 SUBSCRIBER_NOT_FOUND CONSTANT NUMBER := -19;
2551
2552 USER_PROPERTY_NOT_FOUND CONSTANT NUMBER := -28;
2553 PROPERTY_NOT_FOUND CONSTANT NUMBER := -30;
2554
2555 -- Errors Related to Service Entity
2556 NO_SUCH_SERVICE CONSTANT NUMBER := -31;
2557 NO_USER_SUBSCRIPTIONS CONSTANT NUMBER := -32;
2558 NO_SUBSCRIPTIONS_TO_SERVICES CONSTANT NUMBER := -33;
2559 NO_SERVICES_INSTALLED CONSTANT NUMBER := -34;
2560 USER_NOT_SUBSCRIBED CONSTANT NUMBER := -35;
2561 INVALID_SERVICE_SCHEMA CONSTANT NUMBER := -36;
2562
2563 -- Cannot Allocate Memory
2564 ERR_MEM_ALLOC CONSTANT NUMBER := -37;
2565
2566 -- Internal Error
2567 ERR_INTERNAL CONSTANT NUMBER := -38;
2568
2569
2570 -- Options for various input arguments to functions
2571
2572 -- nested levels
2573
2574 NESTED_MEMBERSHIP CONSTANT NUMBER := 0;
2575 DIRECT_MEMBERSHIP CONSTANT NUMBER := 1;
2576
2577 -- Type of User properties
2578
2579 ENTRY_PROPERTIES CONSTANT NUMBER := 0;
2580 DETACHED_PROPERTIES CONSTANT NUMBER := 1;
2581 COMMON_PROPERTIES CONSTANT NUMBER := 2;
2582 NICKNAME_PROPERTY CONSTANT NUMBER := 3;
2583 EXTPROPTYPE_RAD CONSTANT NUMBER := 4;
2584 DEFAULT_RAD_PROPERTIES CONSTANT NUMBER := 5;
2585 IDENTIFICATION_PROPERTIES CONSTANT NUMBER := 6;
2586
2587 -- Modify
2588 ADD_PROPERTY CONSTANT NUMBER := 0;
2589 REPLACE_PROPERTY CONSTANT NUMBER := 1;
2590 DELETE_PROPERTY CONSTANT NUMBER := 2;
2591
2592 ADD_PROPERTY_SET CONSTANT NUMBER := 0;
2593 MODIFY_PROPERTY_SET CONSTANT NUMBER := 1;
2594 DELETE_PROPERTY_SET CONSTANT NUMBER := 2;
2595
2596 -- Auth types
2597 AUTH_SIMPLE CONSTANT NUMBER := 0;
2598 AUTH_EXTENDED CONSTANT NUMBER := 1;
2599
2600 -- Hint types
2601 TYPE_NICKNAME CONSTANT NUMBER := 1;
2602 TYPE_GUID CONSTANT NUMBER := 2;
2603 TYPE_DN CONSTANT NUMBER := 3;
2604 TYPE_DEFAULT CONSTANT NUMBER := 4;
2605
2606 -- Handle Types
2607
2608 SUBSCRIBER_HANDLE CONSTANT NUMBER := 1;
2609 USER_HANDLE CONSTANT NUMBER := 2;
2610 GROUP_HANDLE CONSTANT NUMBER := 3;
2611 APP_HANDLE CONSTANT NUMBER := 4;
2612 ORCLCTX_HANDLE CONSTANT NUMBER := 5;
2613 SERVICE_HANDLE CONSTANT NUMBER := 6;
2614
2615 END DBMS_LDAP_UTL;