DBA Data[Home] [Help]

APPS.FND_LDAP_USER dependencies on FND_LDAP_UTIL

Line 15: function create_user_nodes(p_ldap_session in dbms_ldap.session, p_mod_array in dbms_ldap.mod_array, p_ldap_user in fnd_ldap_util.ldap_user_type,userDN out nocopy varchar2) return pls_integer ;

11: -- End of Package Globals
12: --
13: -------------------------------------------------------------------------------
14:
15: function create_user_nodes(p_ldap_session in dbms_ldap.session, p_mod_array in dbms_ldap.mod_array, p_ldap_user in fnd_ldap_util.ldap_user_type,userDN out nocopy varchar2) return pls_integer ;
16: function create_user_subscription(p_guid in raw) return pls_integer;
17: procedure decode_dates(p_user_name in varchar2, p_start_date in date default null, p_end_date in date default null, x_orclisEnabled out nocopy varchar2, x_user_id out nocopy fnd_user.user_id%type);
18: function delete_user_by_name(p_ldap_session in dbms_ldap.session, p_cn in varchar2) return pls_integer;
19: function delete_user_nodes(p_ldap_session in dbms_ldap.session, p_orclguid in fnd_user.user_guid%type) return pls_integer;

Line 23: function process_attributes(p_ldap_user in fnd_ldap_util.ldap_user_type,

19: function delete_user_nodes(p_ldap_session in dbms_ldap.session, p_orclguid in fnd_user.user_guid%type) return pls_integer;
20: function delete_user_subscription(p_ldap_session in dbms_ldap.session, guid raw) return pls_integer;
21: function delete_uniquemember(p_ldap_session in dbms_ldap.session, p_orclguid in fnd_user.user_guid%type) return pls_integer;
22: procedure disable_user(p_user_guid in raw,p_user_name in varchar2,x_result out nocopy pls_integer);
23: function process_attributes(p_ldap_user in fnd_ldap_util.ldap_user_type,
24: p_operation_type in pls_integer default G_CREATE,
25: x_atts out nocopy dbms_ldap.string_collection,
26: x_att_values out nocopy dbms_ldap.string_collection) return number;
27:

Line 28: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type) return pls_integer;

24: p_operation_type in pls_integer default G_CREATE,
25: x_atts out nocopy dbms_ldap.string_collection,
26: x_att_values out nocopy dbms_ldap.string_collection) return number;
27:
28: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type) return pls_integer;
29: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type, p_expire_password in pls_integer) return pls_integer;
30: function update_user_nodes(p_ldap_session in dbms_ldap.session, p_mod_array in dbms_ldap.mod_array, p_orclguid in raw) return pls_integer;
31:
32:

Line 29: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type, p_expire_password in pls_integer) return pls_integer;

25: x_atts out nocopy dbms_ldap.string_collection,
26: x_att_values out nocopy dbms_ldap.string_collection) return number;
27:
28: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type) return pls_integer;
29: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type, p_expire_password in pls_integer) return pls_integer;
30: function update_user_nodes(p_ldap_session in dbms_ldap.session, p_mod_array in dbms_ldap.mod_array, p_orclguid in raw) return pls_integer;
31:
32:
33: --

Line 36: -- function add_uniquemember(p_ldap_user in fnd_ldap_util.ldap_user_type) return pls_integer is

32:
33: --
34: -------------------------------------------------------------------------------
35: --- REMOVED
36: -- function add_uniquemember(p_ldap_user in fnd_ldap_util.ldap_user_type) return pls_integer is
37: -- translate_ldap_error: Internal
38: -- Will attempt to translate the sqlerrms from an dbms_ldap operation into a FND message
39:
40: -------------------------------------------------------------------------------

Line 70: x_result := fnd_ldap_util.G_SUCCESS;

66: begin
67:
68: -- initializing
69: l_module_source := G_MODULE_SOURCE || 'delete_user: ';
70: x_result := fnd_ldap_util.G_SUCCESS;
71:
72: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
73: then
74: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');

Line 89: x_result := fnd_ldap_util.G_FAILURE;

85: then
86: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,
87: 'NULL guid in FND_USER');
88: end if;
89: x_result := fnd_ldap_util.G_FAILURE;
90: else
91: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
92: then
93: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,

Line 97: --ldapSession := fnd_ldap_util.get_oid_session;

93: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,
94: 'FND_USER GUID::'||l_orclguid);
95: end if;
96: l_filter := 'orclguid='||l_orclguid;
97: --ldapSession := fnd_ldap_util.get_oid_session;
98: --searchNodes := fnd_ldap_util.get_search_nodes;
99: l_base := ''; -- don't need any more for guid search
100: l_attrs(0) := 'orclisenabled';
101: l_attrs(1) := 'creatorsname';

Line 98: --searchNodes := fnd_ldap_util.get_search_nodes;

94: 'FND_USER GUID::'||l_orclguid);
95: end if;
96: l_filter := 'orclguid='||l_orclguid;
97: --ldapSession := fnd_ldap_util.get_oid_session;
98: --searchNodes := fnd_ldap_util.get_search_nodes;
99: l_base := ''; -- don't need any more for guid search
100: l_attrs(0) := 'orclisenabled';
101: l_attrs(1) := 'creatorsname';
102: l_attrs(2) := 'orclguid';

Line 127: if (upper(l_creatorname) = upper(fnd_ldap_util.get_orclappname)

123: end if;
124: l_attrs_vals := dbms_ldap.get_values(ldapSession, l_entry, 'orclguid');
125: l_guid := l_attrs_vals(0);
126:
127: if (upper(l_creatorname) = upper(fnd_ldap_util.get_orclappname)
128: and l_isenabled is not NULL
129: and (upper(l_isenabled) = 'INACTIVE' or upper(l_isenabled) = 'DISABLED')
130: ) then
131: x_result := delete_user_subscription(ldapSession, l_guid);

Line 143: --x_result := fnd_ldap_util.unbind(ldapSession);

139: end if;
140: end if;
141: end if;
142: --end loop;
143: --x_result := fnd_ldap_util.unbind(ldapSession);
144: if (x_result = dbms_ldap.SUCCESS) then
145: x_result := fnd_ldap_util.G_SUCCESS;
146: end if;
147: end if;-- fnd_user guid null check if block ends here

Line 145: x_result := fnd_ldap_util.G_SUCCESS;

141: end if;
142: --end loop;
143: --x_result := fnd_ldap_util.unbind(ldapSession);
144: if (x_result = dbms_ldap.SUCCESS) then
145: x_result := fnd_ldap_util.G_SUCCESS;
146: end if;
147: end if;-- fnd_user guid null check if block ends here
148:
149: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)

Line 160: x_result := fnd_ldap_util.G_FAILURE;

156: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
157: then
158: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
159: end if;
160: x_result := fnd_ldap_util.G_FAILURE;
161:
162: end delete_user;
163:
164: procedure delete_user(p_user_guid in fnd_user.user_guid%type ,

Line 170: ldapSession := fnd_ldap_util.c_get_oid_session(dummy);

166:
167: ldapSession dbms_ldap.session;
168: dummy pls_integer;
169: BEGIN
170: ldapSession := fnd_ldap_util.c_get_oid_session(dummy);
171: delete_user(ldapSession,p_user_guid,x_result);
172: fnd_ldap_util.c_unbind(ldapSession,dummy);
173: end delete_user;
174: --

Line 172: fnd_ldap_util.c_unbind(ldapSession,dummy);

168: dummy pls_integer;
169: BEGIN
170: ldapSession := fnd_ldap_util.c_get_oid_session(dummy);
171: delete_user(ldapSession,p_user_guid,x_result);
172: fnd_ldap_util.c_unbind(ldapSession,dummy);
173: end delete_user;
174: --
175:
176: -------------------------------------------------------------------------------

Line 184: usertype fnd_ldap_util.ldap_user_type;

180: p_expire_password in pls_integer,
181: x_password out nocopy varchar2,
182: x_result out nocopy pls_integer) is
183:
184: usertype fnd_ldap_util.ldap_user_type;
185: l_module_source varchar2(256);
186: no_such_user_exp exception;
187: l_user_id fnd_user.user_id%type;
188: l_local_login varchar2(30);

Line 245: x_result := fnd_ldap_util.G_SUCCESS;

241:
242: x_result := update_user(usertype, p_expire_password);
243:
244: else
245: x_result := fnd_ldap_util.G_SUCCESS;
246: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
247: then
248: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,
249: 'User is a local user or synch is disabled for this user.');

Line 258: if x_result <> fnd_ldap_util.G_SUCCESS then

254: then
255: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');
256: end if;
257:
258: if x_result <> fnd_ldap_util.G_SUCCESS then
259: -- raise no_such_user_exp;
260: -- do not raise exception, the message should be in the FND error stack
261: x_result := fnd_ldap_util.G_FAILURE;
262:

Line 261: x_result := fnd_ldap_util.G_FAILURE;

257:
258: if x_result <> fnd_ldap_util.G_SUCCESS then
259: -- raise no_such_user_exp;
260: -- do not raise exception, the message should be in the FND error stack
261: x_result := fnd_ldap_util.G_FAILURE;
262:
263: else
264: fnd_profile.get_specific(
265: name_z => 'APPS_SSO_LOCAL_LOGIN',

Line 282: x_result := fnd_ldap_util.G_FAILURE;

278: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
279: then
280: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
281: end if;
282: x_result := fnd_ldap_util.G_FAILURE;
283: when others then
284: fnd_message.set_name ('FND', 'FND_SSO_UNEXP_ERROR');
285: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
286: then

Line 289: --x_result := fnd_ldap_util.G_FAILURE;

285: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
286: then
287: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
288: end if;
289: --x_result := fnd_ldap_util.G_FAILURE;
290: -- bug 4573677
291: raise;
292:
293: end change_password;

Line 302: dn := fnd_ldap_util.get_dn_for_guid(guid);

298: dn varchar2(2000);
299: result pls_integer;
300: begin
301:
302: dn := fnd_ldap_util.get_dn_for_guid(guid);
303: if (dn is not null) then
304: result := FND_LDAP_UTIL.G_SUCCESS;
305: else
306: result := FND_LDAP_UTIL.G_FAILURE;

Line 304: result := FND_LDAP_UTIL.G_SUCCESS;

300: begin
301:
302: dn := fnd_ldap_util.get_dn_for_guid(guid);
303: if (dn is not null) then
304: result := FND_LDAP_UTIL.G_SUCCESS;
305: else
306: result := FND_LDAP_UTIL.G_FAILURE;
307: end if;
308: return result;

Line 306: result := FND_LDAP_UTIL.G_FAILURE;

302: dn := fnd_ldap_util.get_dn_for_guid(guid);
303: if (dn is not null) then
304: result := FND_LDAP_UTIL.G_SUCCESS;
305: else
306: result := FND_LDAP_UTIL.G_FAILURE;
307: end if;
308: return result;
309: end user_exists_by_guid;
310: --

Line 318: usertype fnd_ldap_util.ldap_user_type;

314: p_new_user_name in varchar2,
315: x_result out nocopy pls_integer) is
316:
317: l_orclisEnabled varchar2(256);
318: usertype fnd_ldap_util.ldap_user_type;
319: l_module_source varchar2(256);
320: no_such_user_exp exception;
321: invalid_new_user_exp exception;
322: l_nickname varchar2(256);

Line 409: l_nickname := fnd_ldap_util.get_orclcommonnicknameattr(usertype.uid);

405: then
406: usertype.uid := p_new_user_name;
407: usertype.orclGUID := p_user_guid;
408:
409: l_nickname := fnd_ldap_util.get_orclcommonnicknameattr(usertype.uid);
410:
411: /** to do - fnd should send us user_name so that we can propagate user_name changes . the logic below should mimic create_user **/
412:
413: if (upper(l_nickname) = fnd_ldap_util.G_MAIL) then

Line 413: if (upper(l_nickname) = fnd_ldap_util.G_MAIL) then

409: l_nickname := fnd_ldap_util.get_orclcommonnicknameattr(usertype.uid);
410:
411: /** to do - fnd should send us user_name so that we can propagate user_name changes . the logic below should mimic create_user **/
412:
413: if (upper(l_nickname) = fnd_ldap_util.G_MAIL) then
414: usertype.mail := p_new_user_name;
415: elsif (upper(l_nickname) = fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then
416: usertype.facsimileTelephoneNumber := p_new_user_name;
417: end if;

Line 415: elsif (upper(l_nickname) = fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then

411: /** to do - fnd should send us user_name so that we can propagate user_name changes . the logic below should mimic create_user **/
412:
413: if (upper(l_nickname) = fnd_ldap_util.G_MAIL) then
414: usertype.mail := p_new_user_name;
415: elsif (upper(l_nickname) = fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then
416: usertype.facsimileTelephoneNumber := p_new_user_name;
417: end if;
418:
419: --Please refer to following location for a flowchart for the following logic

Line 424: l_new_user_name_exists := FND_LDAP_UTIL.G_TRUE;

420: -- http://files.oraclecorp.com/content/MySharedFolders/Single%20Sign-On/Design%20Documentation/
421: -- Release%203.1/Username_Change.gif
422: -- Refer to bug 4655260.
423:
424: l_new_user_name_exists := FND_LDAP_UTIL.G_TRUE;
425: l_old_nick_name := upper(fnd_oid_util.get_oid_nickname(p_user_guid => p_user_guid));
426:
427: if(l_old_nick_name = p_old_user_name)
428: then

Line 437: if(l_new_user_name_exists = FND_LDAP_UTIL.G_FALSE)

433: end if;
434:
435: l_new_user_name_exists := user_exists(p_user_name => p_new_user_name);
436:
437: if(l_new_user_name_exists = FND_LDAP_UTIL.G_FALSE)
438: then
439: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
440: then
441: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,

Line 445: if (x_result <> fnd_ldap_util.G_SUCCESS)

441: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,
442: 'User with following value for nickname(new) attribute does not exist:: '||p_new_user_name);
443: end if;
444: x_result := update_user(usertype);
445: if (x_result <> fnd_ldap_util.G_SUCCESS)
446: then
447: raise no_such_user_exp;
448: end if;
449: else -- if(l_new_user_name_exists = FND_LDAP_UTIL.G_TRUE)

Line 449: else -- if(l_new_user_name_exists = FND_LDAP_UTIL.G_TRUE)

445: if (x_result <> fnd_ldap_util.G_SUCCESS)
446: then
447: raise no_such_user_exp;
448: end if;
449: else -- if(l_new_user_name_exists = FND_LDAP_UTIL.G_TRUE)
450: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
451: then
452: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,
453: 'User with following value for nickname(new) attribute does exist:: '||p_new_user_name);

Line 475: x_result := fnd_ldap_util.G_SUCCESS;

471: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Current OID nickname and new fnd username match '
472: || l_old_nick_name);
473: end if;
474:
475: x_result := fnd_ldap_util.G_SUCCESS;
476: else --if(l_old_nick_name != p_new_user_name)
477: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
478: then
479: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Current OID nickname and new fnd username dont match '

Line 485: if(l_new_user_name_exists = FND_LDAP_UTIL.G_FALSE)

481: end if;
482:
483: l_new_user_name_exists := user_exists(p_user_name => p_new_user_name);
484:
485: if(l_new_user_name_exists = FND_LDAP_UTIL.G_FALSE)
486: then
487: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
488: then
489: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'New fnd user_name does not exist in OID ');

Line 491: x_result := fnd_ldap_util.G_SUCCESS;

487: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
488: then
489: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'New fnd user_name does not exist in OID ');
490: end if;
491: x_result := fnd_ldap_util.G_SUCCESS;
492: else
493: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
494: then
495: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'New fnd user_name does exist in OID ');

Line 502: x_result := fnd_ldap_util.G_SUCCESS;

498: end if;
499: end if;
500: end if;
501: else
502: x_result := fnd_ldap_util.G_SUCCESS;
503:
504: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
505: then
506: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'User is a local user or Synch profile is disabled.');

Line 522: x_result := fnd_ldap_util.G_FAILURE;

518: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
519: then
520: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
521: end if;
522: x_result := fnd_ldap_util.G_FAILURE;
523: when no_such_user_exp then
524: fnd_message.set_name ('FND', 'FND_SSO_USER_NOT_FOUND');
525: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
526: then

Line 529: x_result := fnd_ldap_util.G_FAILURE;

525: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
526: then
527: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
528: end if;
529: x_result := fnd_ldap_util.G_FAILURE;
530: when others then
531: fnd_message.set_name ('FND', 'FND_SSO_UNEXP_ERROR');
532: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
533: then

Line 536: x_result := fnd_ldap_util.G_FAILURE;

532: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
533: then
534: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
535: end if;
536: x_result := fnd_ldap_util.G_FAILURE;
537: end change_user_name;
538: --
539: -------------------------------------------------------------------------------
540: procedure create_user(p_user_name in varchar2,

Line 552: usertype fnd_ldap_util.ldap_user_type;

548: x_user_guid out nocopy raw,
549: x_password out nocopy varchar2,
550: x_result out nocopy pls_integer) is
551:
552: usertype fnd_ldap_util.ldap_user_type;
553: l_module_source varchar2(256);
554: l_start_date varchar2(256);
555: l_end_date varchar2(656);
556: l_local_login varchar2(100);

Line 583: if (p_expire_password = fnd_ldap_util.G_TRUE) then

579: else
580: usertype.orclisEnabled := fnd_oid_util.G_ENABLED;
581: end if;
582:
583: if (p_expire_password = fnd_ldap_util.G_TRUE) then
584: l_password := p_password;
585: else
586: l_password := null;
587: end if;

Line 599: l_nickname := fnd_ldap_util.get_orclcommonnicknameattr(user_name);

595: end if;
596:
597: -- first create user. If self service, then pass in a null password
598: user_name := p_user_name;
599: l_nickname := fnd_ldap_util.get_orclcommonnicknameattr(user_name);
600:
601: usertype.uid := p_user_name;
602: usertype.sn := p_user_name;
603: usertype.cn := p_user_name;

Line 607: if (upper(l_nickname) = fnd_ldap_util.G_MAIL) then

603: usertype.cn := p_user_name;
604: usertype.userPassword := l_password;
605: usertype.description := p_description;
606:
607: if (upper(l_nickname) = fnd_ldap_util.G_MAIL) then
608: usertype.mail := p_user_name;
609: else
610: usertype.mail := p_email_address;
611: end if;

Line 613: if (upper(l_nickname) = fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then

609: else
610: usertype.mail := p_email_address;
611: end if;
612:
613: if (upper(l_nickname) = fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then
614: usertype.facsimileTelephoneNumber := p_user_name;
615: else
616: usertype.facsimileTelephoneNumber := p_fax;
617: end if;

Line 621: if (x_result = fnd_ldap_util.G_SUCCESS) then

617: end if;
618:
619: x_result := create_user(usertype);
620:
621: if (x_result = fnd_ldap_util.G_SUCCESS) then
622: x_user_guid := get_user_guid(p_user_name);
623:
624: fnd_profile.get_specific(
625: name_z => 'APPS_SSO_LOCAL_LOGIN',

Line 635: if ( (l_password is null) and (x_result = fnd_ldap_util.G_SUCCESS) )then

631: x_password := fnd_web_sec.EXTERNAL_PWD;
632: end if;
633:
634: -- if p_expire_psasword = false then update the user password (and password only)
635: if ( (l_password is null) and (x_result = fnd_ldap_util.G_SUCCESS) )then
636:
637: change_password(x_user_guid,
638: p_user_name,
639: p_password,

Line 650: if ( (l_cp_result = fnd_ldap_util.G_FAILURE ) or (l_du_result = fnd_ldap_util.G_FAILURE) ) then

646: p_user_name,
647: l_du_result);
648: end if;
649:
650: if ( (l_cp_result = fnd_ldap_util.G_FAILURE ) or (l_du_result = fnd_ldap_util.G_FAILURE) ) then
651: delete_user(x_user_guid, x_result);
652: else
653: x_result := fnd_ldap_util.G_SUCCESS;
654: end if;

Line 653: x_result := fnd_ldap_util.G_SUCCESS;

649:
650: if ( (l_cp_result = fnd_ldap_util.G_FAILURE ) or (l_du_result = fnd_ldap_util.G_FAILURE) ) then
651: delete_user(x_user_guid, x_result);
652: else
653: x_result := fnd_ldap_util.G_SUCCESS;
654: end if;
655:
656: end if;
657:

Line 677: function create_user(p_ldap_user in fnd_ldap_util.ldap_user_type)

673:
674: end create_user;
675: --
676: -------------------------------------------------------------------------------
677: function create_user(p_ldap_user in fnd_ldap_util.ldap_user_type)
678: return pls_integer is
679:
680: l_module_source varchar2(256);
681: subsNode varchar2(1000);

Line 708: retval := fnd_ldap_util.G_FAILURE;

704:
705: begin
706: l_module_source := G_MODULE_SOURCE || 'create_user: ';
707: -- set default value to failure. change to success when user created successfully
708: retval := fnd_ldap_util.G_FAILURE;
709: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
710: then
711: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
712: end if;

Line 715: ldapSession := fnd_ldap_util.c_get_oid_session(flag);

711: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
712: end if;
713:
714:
715: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
716:
717: result := user_exists(ldapSession, p_ldap_user.uid);
718: -- only proceed if user doesn't exist and all mandatory attributes are present
719: if (result = fnd_ldap_util.G_FAILURE) and (p_ldap_user.sn is not null) and

Line 719: if (result = fnd_ldap_util.G_FAILURE) and (p_ldap_user.sn is not null) and

715: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
716:
717: result := user_exists(ldapSession, p_ldap_user.uid);
718: -- only proceed if user doesn't exist and all mandatory attributes are present
719: if (result = fnd_ldap_util.G_FAILURE) and (p_ldap_user.sn is not null) and
720: (p_ldap_user.cn is not null) /*and (p_ldap_user.userPassword is not null)*/ then
721:
722: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
723: then

Line 747: if ((retval <> fnd_ldap_util.G_SUCCESS) and (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL))

743: dbms_ldap.populate_mod_array(modptr => modArray, mod_op => dbms_ldap.mod_add, mod_type => modtype, modval => modvalues);
744: end loop;
745:
746: retval := create_user_nodes(ldapSession, modArray, p_ldap_user,l_userDN);
747: if ((retval <> fnd_ldap_util.G_SUCCESS) and (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL))
748: then
749: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'User creation failed');
750: end if;
751:

Line 753: if (retval = fnd_ldap_util.G_SUCCESS) then

749: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'User creation failed');
750: end if;
751:
752:
753: if (retval = fnd_ldap_util.G_SUCCESS) then
754: l_guid := fnd_ldap_util.get_guid_for_dn(ldapSession,l_userDN);
755: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
756: then
757: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Creating susbscriptions');

Line 754: l_guid := fnd_ldap_util.get_guid_for_dn(ldapSession,l_userDN);

750: end if;
751:
752:
753: if (retval = fnd_ldap_util.G_SUCCESS) then
754: l_guid := fnd_ldap_util.get_guid_for_dn(ldapSession,l_userDN);
755: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
756: then
757: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Creating susbscriptions');
758: end if;

Line 761: if ((retval <> fnd_ldap_util.G_SUCCESS) and (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL))

757: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Creating susbscriptions');
758: end if;
759:
760: retval := create_user_subscription(l_guid);
761: if ((retval <> fnd_ldap_util.G_SUCCESS) and (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL))
762: then
763: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Subscription creation failed');
764: end if;
765:

Line 770: if ( (retval <> fnd_ldap_util.G_SUCCESS) ) then

766: end if;
767:
768: -- if retval=false or result=false, that means partial creation, therefore
769: -- delete all created entries (rollback)
770: if ( (retval <> fnd_ldap_util.G_SUCCESS) ) then
771: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
772: then
773: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Deleting user due previous fail');
774: end if;

Line 782: elsif (result = fnd_ldap_util.G_SUCCESS) then

778:
779: dbms_ldap.free_mod_array(modptr => modArray);
780:
781:
782: elsif (result = fnd_ldap_util.G_SUCCESS) then
783:
784: fnd_profile.get_specific(
785: name_z => 'APPS_SSO_LINK_SAME_NAMES',
786: val_z => l_link,

Line 801: fnd_ldap_util.c_unbind(ldapSession,flag);

797:
798: end if;
799:
800: end if;
801: fnd_ldap_util.c_unbind(ldapSession,flag);
802:
803: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
804: then
805: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');

Line 821: function create_user_nodes(p_ldap_session in dbms_ldap.session, p_mod_array in dbms_ldap.mod_array, p_ldap_user in fnd_ldap_util.ldap_user_type,

817:
818: end create_user;
819: --
820: -------------------------------------------------------------------------------
821: function create_user_nodes(p_ldap_session in dbms_ldap.session, p_mod_array in dbms_ldap.mod_array, p_ldap_user in fnd_ldap_util.ldap_user_type,
822: userDN out nocopy varchar2)
823: return pls_integer is
824:
825: l_module_source varchar2(256);

Line 839: retval := fnd_ldap_util.G_FAILURE;

835:
836: begin
837: l_module_source := G_MODULE_SOURCE || 'create_user_nodes: ';
838: -- set default value to failure. change to success when user created successfully
839: retval := fnd_ldap_util.G_FAILURE;
840: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
841: then
842: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'Begin');
843: end if;

Line 847: if ((retval <> fnd_ldap_util.G_SUCCESS) and (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL))

843: end if;
844:
845: user_name := p_ldap_user.uid ;
846: dn :=fnd_oid_plug.getDN(user_name);
847: if ((retval <> fnd_ldap_util.G_SUCCESS) and (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL))
848: then
849: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Usename:'||user_name||' dn:'||dn);
850: end if;
851:

Line 855: retval := fnd_ldap_util.G_SUCCESS;

851:
852: result := dbms_ldap.add_s(ld => p_ldap_session, entrydn => dn , modptr => p_mod_array);
853: if result = dbms_ldap.SUCCESS then
854: --result := dbms_ldap.get_session_info(p_ldap_session, 1, l_data);
855: retval := fnd_ldap_util.G_SUCCESS;
856: userDN := dn;
857: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
858: then
859: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'created DN' || userDN);

Line 863: retval := fnd_ldap_util.G_FALSE;

859: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'created DN' || userDN);
860: end if;
861:
862: else
863: retval := fnd_ldap_util.G_FALSE;
864: userDN := null;
865: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
866: then
867: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Nothig was created');

Line 898: return 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;

894: Now is simple, in the future may change for multiples realms.
895: */
896: function get_ACCOUNT_dn(p_guid in raw) return varchar2 is
897: begin
898: return 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;
899: end get_ACCOUNT_dn;
900: --
901: -------------------------------------------------------------------------------
902: function create_user_subscription(p_guid in raw)

Line 919: retval := fnd_ldap_util.G_FAILURE;

915: flag pls_integer;
916: begin
917: l_module_source := G_MODULE_SOURCE || 'create_user_subscription: ';
918: -- set default value to failure. change to success when user created successfully
919: retval := fnd_ldap_util.G_FAILURE;
920: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
921: then
922: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin guid='||p_guid);
923: end if;

Line 925: ldapSession := fnd_ldap_util.c_get_oid_session(flag);

921: then
922: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin guid='||p_guid);
923: end if;
924:
925: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
926:
927: userDN := fnd_ldap_util.get_dn_for_guid(p_guid);
928:
929: acctNode := get_ACCOUNT_dn(p_guid);

Line 927: userDN := fnd_ldap_util.get_dn_for_guid(p_guid);

923: end if;
924:
925: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
926:
927: userDN := fnd_ldap_util.get_dn_for_guid(p_guid);
928:
929: acctNode := get_ACCOUNT_dn(p_guid);
930: -- num_attributes := process_attributes(p_ldap_user, x_atts => l_atts,
931: -- x_att_values => l_att_values);

Line 946: fnd_ldap_util.add_attribute_M(ldapSession,acctNode,'uniqueMember',userDN);

942: retval := dbms_ldap.add_s(ld => ldapSession, entrydn => subsNode, modptr => modArray);
943:
944: if (retval = dbms_ldap.SUCCESS) then
945: --retval := add_uniquemember(p_ldap_user);
946: fnd_ldap_util.add_attribute_M(ldapSession,acctNode,'uniqueMember',userDN);
947: retval:= fnd_ldap_util.G_SUCCESS;
948: else
949: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
950: then

Line 947: retval:= fnd_ldap_util.G_SUCCESS;

943:
944: if (retval = dbms_ldap.SUCCESS) then
945: --retval := add_uniquemember(p_ldap_user);
946: fnd_ldap_util.add_attribute_M(ldapSession,acctNode,'uniqueMember',userDN);
947: retval:= fnd_ldap_util.G_SUCCESS;
948: else
949: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
950: then
951: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Failed! retval='||retval||' subsNode:'||subsNode);

Line 956: fnd_ldap_util.c_unbind(ldapSession,flag);

952: end if;
953: end if;
954:
955: dbms_ldap.free_mod_array(modptr => modArray);
956: fnd_ldap_util.c_unbind(ldapSession,flag);
957:
958: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
959: then
960: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');

Line 1064: -- subsNode := 'cn=' || p_cn || ',cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;

1060: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1061: then
1062: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
1063: end if;
1064: -- subsNode := 'cn=' || p_cn || ',cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;
1065: -- result := dbms_ldap.delete_s(ld => p_ldap_session, entrydn => subsNode);
1066: l_guid := get_user_guid(p_ldap_session,p_cn);
1067: delete_user(p_ldap_session,l_guid,result);
1068:

Line 1105: usersNode := fnd_ldap_util.get_dn_for_guid(p_orclguid => p_orclguid);

1101: end if;
1102:
1103:
1104:
1105: usersNode := fnd_ldap_util.get_dn_for_guid(p_orclguid => p_orclguid);
1106:
1107: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1108: then
1109: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'DN for user with GUID::'

Line 1142: subsNode := 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;

1138: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
1139: end if;
1140:
1141: -- delete subcriptions with orclOwnerGUID
1142: subsNode := 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;
1143: l_result := dbms_ldap.search_s(ld => p_ldap_session, base => subsNode,
1144: scope => dbms_ldap.SCOPE_SUBTREE, filter => 'orclOwnerGUID=' || l_user_guid, attrs => l_attrs, attronly => 0, res => l_message);
1145: if (l_result is not NULL) then
1146: l_entry := dbms_ldap.first_entry(p_ldap_session, l_message);

Line 1176: retval := fnd_ldap_util.G_FAILURE;

1172:
1173: begin
1174: l_module_source := G_MODULE_SOURCE || 'delete_uniquemember: ';
1175: -- set default value to failure. change to success when added successfully
1176: retval := fnd_ldap_util.G_FAILURE;
1177: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1178: then
1179: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
1180: end if;

Line 1182: subsNode := 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;

1178: then
1179: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
1180: end if;
1181:
1182: subsNode := 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;
1183:
1184: modArray := dbms_ldap.create_mod_array(num => 1);
1185:
1186: modmultivalues(0) := fnd_ldap_util.get_dn_for_guid(p_orclguid);

Line 1186: modmultivalues(0) := fnd_ldap_util.get_dn_for_guid(p_orclguid);

1182: subsNode := 'cn=ACCOUNTS,cn=subscription_data,cn=subscriptions,' || fnd_ldap_util.get_orclappname;
1183:
1184: modArray := dbms_ldap.create_mod_array(num => 1);
1185:
1186: modmultivalues(0) := fnd_ldap_util.get_dn_for_guid(p_orclguid);
1187:
1188: dbms_ldap.populate_mod_array(modptr => modArray, mod_op => dbms_ldap.mod_delete, mod_type => 'uniquemember', modval => modmultivalues);
1189:
1190: retval := dbms_ldap.modify_s(ld => p_ldap_Session, entrydn => subsNode, modptr => modArray);

Line 1194: retval := fnd_ldap_util.G_SUCCESS;

1190: retval := dbms_ldap.modify_s(ld => p_ldap_Session, entrydn => subsNode, modptr => modArray);
1191:
1192:
1193: if (retval = dbms_ldap.SUCCESS) then
1194: retval := fnd_ldap_util.G_SUCCESS;
1195: end if;
1196:
1197: dbms_ldap.free_mod_array(modptr => modArray);
1198:

Line 1221: usertype fnd_ldap_util.ldap_user_type;

1217: procedure disable_user(p_user_guid in raw,
1218: p_user_name in varchar2,
1219: x_result out nocopy pls_integer) is
1220:
1221: usertype fnd_ldap_util.ldap_user_type;
1222: l_module_source varchar2(256);
1223: no_such_user_exp exception;
1224: l_user_id fnd_user.user_id%type;
1225: l_local_login varchar2(30);

Line 1250: if x_result <> fnd_ldap_util.G_SUCCESS then

1246: then
1247: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');
1248: end if;
1249:
1250: if x_result <> fnd_ldap_util.G_SUCCESS then
1251: raise no_such_user_exp;
1252: end if;
1253:
1254: exception

Line 1261: x_result := fnd_ldap_util.G_FAILURE;

1257: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1258: then
1259: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
1260: end if;
1261: x_result := fnd_ldap_util.G_FAILURE;
1262: when others then
1263: fnd_message.set_name ('FND', 'FND_SSO_UNEXP_ERROR');
1264: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1265: then

Line 1268: x_result := fnd_ldap_util.G_FAILURE;

1264: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1265: then
1266: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
1267: end if;
1268: x_result := fnd_ldap_util.G_FAILURE;
1269:
1270: end disable_user;
1271: --
1272: -------------------------------------------------------------------------------

Line 1299: ldapSession := fnd_ldap_util.c_get_oid_session(flag);

1295: then
1296: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'Begin');
1297: end if;
1298:
1299: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
1300:
1301: searchBase := fnd_oid_plug.getSearchBase(p_user_name);
1302: searchFilter := fnd_oid_plug.getSearchFilter(p_user_name);
1303:

Line 1312: fnd_ldap_util.c_unbind(ldapSession,flag);

1308: l_entry := dbms_ldap.first_entry(ldapSession, l_message);
1309: l_attrs := dbms_ldap.get_values(ldapSession, l_entry, p_attribute_name);
1310: l_attribute_value := l_attrs(0);
1311:
1312: fnd_ldap_util.c_unbind(ldapSession,flag);
1313:
1314: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1315: then
1316: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'End');

Line 1359: -- search_base := fnd_ldap_util.get_default_realm;

1355: end if;
1356: search_filter := fnd_oid_plug.getSearchFilter(p_user_name);
1357: search_base := '' ; -- going with this , as is what SSO Login does
1358: -- Other options are
1359: -- search_base := fnd_ldap_util.get_default_realm;
1360: -- search_base := fnd_ldap_util.get_user_base_dn(fnd_ldap_util.get_default_realm);
1361: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1362: then
1363: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, ' filter : ' || search_filter);

Line 1360: -- search_base := fnd_ldap_util.get_user_base_dn(fnd_ldap_util.get_default_realm);

1356: search_filter := fnd_oid_plug.getSearchFilter(p_user_name);
1357: search_base := '' ; -- going with this , as is what SSO Login does
1358: -- Other options are
1359: -- search_base := fnd_ldap_util.get_default_realm;
1360: -- search_base := fnd_ldap_util.get_user_base_dn(fnd_ldap_util.get_default_realm);
1361: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1362: then
1363: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, ' filter : ' || search_filter);
1364: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, ' search_base : ' || search_base);

Line 1367: ldapSession := fnd_ldap_util.c_get_oid_session(flag);

1363: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, ' filter : ' || search_filter);
1364: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, ' search_base : ' || search_base);
1365: end if;
1366:
1367: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
1368:
1369: l_attrs(0) := 'orclguid';
1370: result := dbms_ldap.search_s(ld => ldapSession, base => search_base, scope => dbms_ldap.SCOPE_SUBTREE, filter => search_filter , attrs => l_attrs, attronly => 0, res => l_message);
1371:

Line 1401: fnd_ldap_util.c_unbind(ldapSession,flag);

1397: end if;
1398: end if ;
1399:
1400:
1401: fnd_ldap_util.c_unbind(ldapSession,flag);
1402:
1403: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1404: then
1405: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, ' END orclguid='||orclguid||' n='||n);

Line 1429: -- retval := fnd_ldap_util.G_FAILURE;

1425: dummy dbms_ldap.session;
1426:
1427: begin
1428: l_module_source := G_MODULE_SOURCE || 'get_user_guid: ';
1429: -- retval := fnd_ldap_util.G_FAILURE;
1430: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1431: then
1432: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
1433: end if;

Line 1436: --usersNodes := fnd_ldap_util.get_users_nodes;

1432: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
1433: end if;
1434:
1435: ldapSession := p_ldap_session;
1436: --usersNodes := fnd_ldap_util.get_users_nodes;
1437: --usersNode := 'cn=' || p_user_name || ',' || usersNodes(0);
1438: searchBase := fnd_oid_plug.getSearchBase(p_user_name);
1439: searchFilter := fnd_oid_plug.getSearchFilter(p_user_name);
1440:

Line 1465: --result := fnd_ldap_util.unbind(ldapSession);

1461: then
1462: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'GUID found = ' || l_user_guid);
1463: end if;
1464:
1465: --result := fnd_ldap_util.unbind(ldapSession);
1466:
1467: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1468: then
1469: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');

Line 1480: dummy := fnd_ldap_util.c_get_oid_session(result);

1476: then
1477: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
1478: -- print stack just for 7306960
1479: result:= -99;
1480: dummy := fnd_ldap_util.c_get_oid_session(result);
1481: end if;
1482: raise;
1483:
1484: end get_user_guid;

Line 1492: l_ldap := fnd_ldap_util.c_get_oid_session(dummy);

1488: l_ldap dbms_ldap.session;
1489: ret fnd_user.user_guid%type;
1490: dummy pls_integer;
1491: BEGIN
1492: l_ldap := fnd_ldap_util.c_get_oid_session(dummy);
1493: ret := get_user_guid(l_ldap,p_user_name);
1494: fnd_ldap_util.C_unbind(l_ldap,dummy);
1495: return ret;
1496: END get_user_guid;

Line 1494: fnd_ldap_util.C_unbind(l_ldap,dummy);

1490: dummy pls_integer;
1491: BEGIN
1492: l_ldap := fnd_ldap_util.c_get_oid_session(dummy);
1493: ret := get_user_guid(l_ldap,p_user_name);
1494: fnd_ldap_util.C_unbind(l_ldap,dummy);
1495: return ret;
1496: END get_user_guid;
1497:
1498: --

Line 1531: if (l_result = fnd_ldap_util.G_SUCCESS) then

1527: fnd_oid_util.add_user_to_OID_sub_list(p_orclguid => l_orclguid, x_result => l_result);
1528:
1529: x_result := l_result;
1530:
1531: if (l_result = fnd_ldap_util.G_SUCCESS) then
1532: x_user_guid := l_orclguid;
1533:
1534: fnd_profile.get_specific(
1535: name_z => 'APPS_SSO_LOCAL_LOGIN',

Line 1549: x_result := fnd_ldap_util.G_FAILURE;

1545:
1546: -- user does not exist in OID
1547: else
1548: fnd_message.set_name('FND', 'FND_SSO_USER_NOT_FOUND');
1549: x_result := fnd_ldap_util.G_FAILURE;
1550: end if;
1551:
1552: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1553: then

Line 1568: function process_attributes(p_ldap_user in fnd_ldap_util.ldap_user_type,

1564:
1565: end link_user;
1566: --
1567: -------------------------------------------------------------------------------
1568: function process_attributes(p_ldap_user in fnd_ldap_util.ldap_user_type,
1569: p_operation_type in pls_integer default G_CREATE,
1570: x_atts out nocopy dbms_ldap.string_collection,
1571: x_att_values out nocopy dbms_ldap.string_collection)
1572: return number is

Line 1747: if (l_user_exists = fnd_ldap_util.G_SUCCESS) then

1743: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'No other FND users linked to this OID User');
1744: end if;
1745: l_user_exists := user_exists_by_guid( p_user_guid);
1746:
1747: if (l_user_exists = fnd_ldap_util.G_SUCCESS) then
1748:
1749: l_ldap_session := fnd_ldap_util.c_get_oid_session(dummy);
1750:
1751: x_result := delete_user_subscription(l_ldap_session, p_user_guid);

Line 1749: l_ldap_session := fnd_ldap_util.c_get_oid_session(dummy);

1745: l_user_exists := user_exists_by_guid( p_user_guid);
1746:
1747: if (l_user_exists = fnd_ldap_util.G_SUCCESS) then
1748:
1749: l_ldap_session := fnd_ldap_util.c_get_oid_session(dummy);
1750:
1751: x_result := delete_user_subscription(l_ldap_session, p_user_guid);
1752: x_result := delete_uniquemember(l_ldap_session, p_user_guid);
1753:

Line 1757: x_result := fnd_ldap_util.G_FAILURE;

1753:
1754: -- user does not exist in OID
1755: else
1756: fnd_message.set_name('FND', 'FND_SSO_USER_NOT_FOUND');
1757: x_result := fnd_ldap_util.G_FAILURE;
1758: end if;
1759:
1760: -- other users linked
1761: else

Line 1768: x_result := fnd_ldap_util.G_FAILURE;

1764: then
1765: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Other FND users linked to this OID User');
1766: end if;
1767:
1768: x_result := fnd_ldap_util.G_FAILURE;
1769: fnd_message.set_name ('FND', 'FND_SSO_USER_MULT_LINKED');
1770:
1771: end if;
1772: if ( l_ldap_session is not null) then fnd_ldap_util.c_unbind(l_ldap_session,dummy); end if ;

Line 1772: if ( l_ldap_session is not null) then fnd_ldap_util.c_unbind(l_ldap_session,dummy); end if ;

1768: x_result := fnd_ldap_util.G_FAILURE;
1769: fnd_message.set_name ('FND', 'FND_SSO_USER_MULT_LINKED');
1770:
1771: end if;
1772: if ( l_ldap_session is not null) then fnd_ldap_util.c_unbind(l_ldap_session,dummy); end if ;
1773: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1774: then
1775: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');
1776: end if;

Line 1825: usertype fnd_ldap_util.ldap_user_type;

1821: x_result out nocopy pls_integer) is
1822:
1823:
1824: l_orclisEnabled varchar2(256);
1825: usertype fnd_ldap_util.ldap_user_type;
1826: l_module_source varchar2(256);
1827: no_such_user_exp exception;
1828: l_nickname varchar2(256);
1829:

Line 1910: --l_nickname := fnd_ldap_util.get_orclcommonnicknameattr;

1906: end if;
1907:
1908: usertype.orclGUID := p_user_guid;
1909:
1910: --l_nickname := fnd_ldap_util.get_orclcommonnicknameattr;
1911: l_nickname := fnd_oid_plug.getNickNameattr(p_user_name);
1912:
1913: /** to do - fnd should send us user_name so that we can propagate user_name changes . the logic below should mimic create_user **/
1914:

Line 1915: if (upper(l_nickname) <> fnd_ldap_util.G_MAIL) then

1911: l_nickname := fnd_oid_plug.getNickNameattr(p_user_name);
1912:
1913: /** to do - fnd should send us user_name so that we can propagate user_name changes . the logic below should mimic create_user **/
1914:
1915: if (upper(l_nickname) <> fnd_ldap_util.G_MAIL) then
1916: usertype.mail := p_email_address;
1917: end if;
1918:
1919: if (upper(l_nickname) <> fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then

Line 1919: if (upper(l_nickname) <> fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then

1915: if (upper(l_nickname) <> fnd_ldap_util.G_MAIL) then
1916: usertype.mail := p_email_address;
1917: end if;
1918:
1919: if (upper(l_nickname) <> fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then
1920: usertype.facsimileTelephoneNumber := p_fax;
1921: end if;
1922:
1923: x_result := update_user(usertype);

Line 1926: x_result := fnd_ldap_util.G_SUCCESS;

1922:
1923: x_result := update_user(usertype);
1924:
1925: else
1926: x_result := fnd_ldap_util.G_SUCCESS;
1927: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1928: then
1929: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,
1930: 'User is a local user or synch is disabled for this user.');

Line 1939: if x_result <> fnd_ldap_util.G_SUCCESS then

1935: then
1936: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');
1937: end if;
1938:
1939: if x_result <> fnd_ldap_util.G_SUCCESS then
1940: raise no_such_user_exp;
1941: else
1942: fnd_profile.get_specific(
1943: name_z => 'APPS_SSO_LOCAL_LOGIN',

Line 1960: x_result := fnd_ldap_util.G_FAILURE;

1956: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1957: then
1958: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
1959: end if;
1960: x_result := fnd_ldap_util.G_FAILURE;
1961: when others then
1962: fnd_message.set_name ('FND', 'FND_SSO_UNEXP_ERROR');
1963: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1964: then

Line 1967: x_result := fnd_ldap_util.G_FAILURE;

1963: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
1964: then
1965: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
1966: end if;
1967: x_result := fnd_ldap_util.G_FAILURE;
1968:
1969: end update_user;
1970: --
1971: -------------------------------------------------------------------------------

Line 1985: usertype fnd_ldap_util.ldap_user_type;

1981: x_password out nocopy varchar2,
1982: x_result out nocopy pls_integer) is
1983:
1984: l_orclisEnabled varchar2(256);
1985: usertype fnd_ldap_util.ldap_user_type;
1986: l_module_source varchar2(256);
1987: no_such_user_exp exception;
1988: l_nickname varchar2(256);
1989: l_user_id fnd_user.user_id%type;

Line 2073: --l_nickname := fnd_ldap_util.get_orclcommonnicknameattr;

2069: if (l_orclisEnabled = fnd_oid_util.G_ENABLED) then
2070: usertype.orclisEnabled := fnd_oid_util.G_ENABLED;
2071: end if;
2072:
2073: --l_nickname := fnd_ldap_util.get_orclcommonnicknameattr;
2074: l_nickname := fnd_oid_plug.getNickNameattr(p_user_name);
2075:
2076: /** to do - fnd should send us user_name so that we can propagate user_name changes . the logic below should mimic create_user **/
2077:

Line 2078: if (upper(l_nickname) <> fnd_ldap_util.G_MAIL) then

2074: l_nickname := fnd_oid_plug.getNickNameattr(p_user_name);
2075:
2076: /** to do - fnd should send us user_name so that we can propagate user_name changes . the logic below should mimic create_user **/
2077:
2078: if (upper(l_nickname) <> fnd_ldap_util.G_MAIL) then
2079: usertype.mail := p_email_address;
2080: end if;
2081:
2082: if (upper(l_nickname) <> fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then

Line 2082: if (upper(l_nickname) <> fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then

2078: if (upper(l_nickname) <> fnd_ldap_util.G_MAIL) then
2079: usertype.mail := p_email_address;
2080: end if;
2081:
2082: if (upper(l_nickname) <> fnd_ldap_util.G_FACSIMILETELEPHONENUMBER) then
2083: usertype.facsimileTelephoneNumber := p_fax;
2084: end if;
2085:
2086: x_result := update_user(usertype);

Line 2089: x_result := fnd_ldap_util.G_SUCCESS;

2085:
2086: x_result := update_user(usertype);
2087:
2088: else
2089: x_result := fnd_ldap_util.G_SUCCESS;
2090: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2091: then
2092: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,
2093: 'User is a local user or synch is disabled for this user.');

Line 2102: if x_result <> fnd_ldap_util.G_SUCCESS then

2098: then
2099: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'End');
2100: end if;
2101:
2102: if x_result <> fnd_ldap_util.G_SUCCESS then
2103: raise no_such_user_exp;
2104: else
2105: fnd_profile.get_specific(
2106: name_z => 'APPS_SSO_LOCAL_LOGIN',

Line 2123: x_result := fnd_ldap_util.G_FAILURE;

2119: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2120: then
2121: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
2122: end if;
2123: x_result := fnd_ldap_util.G_FAILURE;
2124: when others then
2125: fnd_message.set_name ('FND', 'FND_SSO_UNEXP_ERROR');
2126: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2127: then

Line 2130: --x_result := fnd_ldap_util.G_FAILURE;

2126: if (fnd_log.LEVEL_ERROR >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2127: then
2128: fnd_log.string(fnd_log.LEVEL_ERROR, l_module_source, sqlerrm);
2129: end if;
2130: --x_result := fnd_ldap_util.G_FAILURE;
2131: -- bug 4573677
2132: raise;
2133:
2134: end update_user;

Line 2137: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type)

2133:
2134: end update_user;
2135: --
2136: -------------------------------------------------------------------------------
2137: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type)
2138: return pls_integer is
2139:
2140: l_module_source varchar2(256);
2141: subsNode varchar2(1000);

Line 2163: retval := fnd_ldap_util.G_FAILURE;

2159:
2160: begin
2161: l_module_source := G_MODULE_SOURCE || 'update_user: ';
2162: -- set default value to failure. change to success when user updated successfully
2163: retval := fnd_ldap_util.G_FAILURE;
2164: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2165: then
2166: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2167: end if;

Line 2173: if (result = fnd_ldap_util.G_SUCCESS) and (p_ldap_user.orclGUID is not null)

2169: /* result := user_exists(username => p_ldap_user.sn); */
2170: result := user_exists_by_guid(p_ldap_user.orclGUID);
2171:
2172: -- only proceed if user exists and all mandatory attributes are present
2173: if (result = fnd_ldap_util.G_SUCCESS) and (p_ldap_user.orclGUID is not null)
2174: then
2175: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
2176: num_attributes := process_attributes(p_ldap_user, G_UPDATE,
2177: x_atts => l_atts, x_att_values => l_att_values);

Line 2175: ldapSession := fnd_ldap_util.c_get_oid_session(flag);

2171:
2172: -- only proceed if user exists and all mandatory attributes are present
2173: if (result = fnd_ldap_util.G_SUCCESS) and (p_ldap_user.orclGUID is not null)
2174: then
2175: ldapSession := fnd_ldap_util.c_get_oid_session(flag);
2176: num_attributes := process_attributes(p_ldap_user, G_UPDATE,
2177: x_atts => l_atts, x_att_values => l_att_values);
2178: if (num_attributes>0)
2179: then

Line 2196: -- fnd_ldap_util.c_unbind(ldapSession,flag);

2192: retval := update_user_nodes(ldapSession, modArray, p_ldap_user.orclGUID);
2193:
2194: dbms_ldap.free_mod_array(modptr => modArray);
2195: -- 7306960
2196: -- fnd_ldap_util.c_unbind(ldapSession,flag);
2197: else
2198: retval :=fnd_ldap_util.G_SUCCESS;
2199: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2200: then

Line 2198: retval :=fnd_ldap_util.G_SUCCESS;

2194: dbms_ldap.free_mod_array(modptr => modArray);
2195: -- 7306960
2196: -- fnd_ldap_util.c_unbind(ldapSession,flag);
2197: else
2198: retval :=fnd_ldap_util.G_SUCCESS;
2199: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2200: then
2201: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, ' num_attributes=0 -> No changes to OiD');
2202: end if;

Line 2205: fnd_ldap_util.c_unbind(ldapSession,flag);

2201: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, ' num_attributes=0 -> No changes to OiD');
2202: end if;
2203: end if;
2204: -- bug 7306960
2205: fnd_ldap_util.c_unbind(ldapSession,flag);
2206: end if;
2207:
2208: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2209: then

Line 2226: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type, p_expire_password in pls_integer)

2222:
2223: end update_user;
2224: --
2225: -------------------------------------------------------------------------------
2226: function update_user(p_ldap_user in fnd_ldap_util.ldap_user_type, p_expire_password in pls_integer)
2227: return pls_integer is
2228:
2229: l_module_source varchar2(256);
2230: subsNode varchar2(1000);

Line 2250: retval := fnd_ldap_util.G_FAILURE;

2246:
2247: begin
2248: l_module_source := G_MODULE_SOURCE || 'update_user: ';
2249: -- set default value to failure. change to success when user updated successfully
2250: retval := fnd_ldap_util.G_FAILURE;
2251: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2252: then
2253: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2254: end if;

Line 2259: if (result = fnd_ldap_util.G_SUCCESS) and (p_ldap_user.orclGUID is not null)

2255:
2256: result := user_exists_by_guid( p_ldap_user.orclGUID);
2257:
2258: -- only proceed if user exists and all mandatory attributes are present
2259: if (result = fnd_ldap_util.G_SUCCESS) and (p_ldap_user.orclGUID is not null)
2260: then
2261: -- WARN do not use c_get_oid_session, since proxied session cannot be cached
2262: if (p_expire_password = fnd_ldap_util.G_TRUE) then
2263: ldapSession := fnd_ldap_util.get_oid_session;

Line 2262: if (p_expire_password = fnd_ldap_util.G_TRUE) then

2258: -- only proceed if user exists and all mandatory attributes are present
2259: if (result = fnd_ldap_util.G_SUCCESS) and (p_ldap_user.orclGUID is not null)
2260: then
2261: -- WARN do not use c_get_oid_session, since proxied session cannot be cached
2262: if (p_expire_password = fnd_ldap_util.G_TRUE) then
2263: ldapSession := fnd_ldap_util.get_oid_session;
2264: else
2265: fnd_ldap_util.proxy_as_user(p_orclguid => p_ldap_user.orclGUID,
2266: x_ldap_session => ldapSession);

Line 2263: ldapSession := fnd_ldap_util.get_oid_session;

2259: if (result = fnd_ldap_util.G_SUCCESS) and (p_ldap_user.orclGUID is not null)
2260: then
2261: -- WARN do not use c_get_oid_session, since proxied session cannot be cached
2262: if (p_expire_password = fnd_ldap_util.G_TRUE) then
2263: ldapSession := fnd_ldap_util.get_oid_session;
2264: else
2265: fnd_ldap_util.proxy_as_user(p_orclguid => p_ldap_user.orclGUID,
2266: x_ldap_session => ldapSession);
2267: end if;

Line 2265: fnd_ldap_util.proxy_as_user(p_orclguid => p_ldap_user.orclGUID,

2261: -- WARN do not use c_get_oid_session, since proxied session cannot be cached
2262: if (p_expire_password = fnd_ldap_util.G_TRUE) then
2263: ldapSession := fnd_ldap_util.get_oid_session;
2264: else
2265: fnd_ldap_util.proxy_as_user(p_orclguid => p_ldap_user.orclGUID,
2266: x_ldap_session => ldapSession);
2267: end if;
2268:
2269: num_attributes := process_attributes(p_ldap_user, G_UPDATE,

Line 2282: result := fnd_ldap_util.unbind(ldapSession);

2278:
2279: retval := update_user_nodes(ldapSession, modArray, p_ldap_user.orclGUID);
2280:
2281: dbms_ldap.free_mod_array(modptr => modArray);
2282: result := fnd_ldap_util.unbind(ldapSession);
2283: end if;
2284:
2285: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2286: then

Line 2314: retval := fnd_ldap_util.G_FAILURE;

2310:
2311: begin
2312: l_module_source := G_MODULE_SOURCE || 'update_user_nodes: ';
2313: -- set default value to failure. change to success when user created successfully
2314: retval := fnd_ldap_util.G_FAILURE;
2315: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2316: then
2317: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2318: end if;

Line 2320: usersNode := fnd_ldap_util.get_dn_for_guid(p_orclguid, p_ldap_session);

2316: then
2317: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2318: end if;
2319:
2320: usersNode := fnd_ldap_util.get_dn_for_guid(p_orclguid, p_ldap_session);
2321: -- dbms_ldap.use_exception := true;
2322:
2323: retval := dbms_ldap.modify_s(ld => p_ldap_session, entrydn => usersNode, modptr => p_mod_array);
2324:

Line 2326: retval := fnd_ldap_util.G_SUCCESS;

2322:
2323: retval := dbms_ldap.modify_s(ld => p_ldap_session, entrydn => usersNode, modptr => p_mod_array);
2324:
2325: if (retval = dbms_ldap.SUCCESS) then
2326: retval := fnd_ldap_util.G_SUCCESS;
2327: end if;
2328:
2329: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2330: then

Line 2351: ldap := fnd_ldap_util.c_get_oid_session(flag);

2347: ret pls_integer;
2348: ret2 pls_integer;
2349: flag pls_integer;
2350: begin
2351: ldap := fnd_ldap_util.c_get_oid_session(flag);
2352: ret := user_exists(ldap,p_user_name);
2353: fnd_ldap_util.c_unbind(ldap,flag);
2354: return ret;
2355: end user_exists;

Line 2353: fnd_ldap_util.c_unbind(ldap,flag);

2349: flag pls_integer;
2350: begin
2351: ldap := fnd_ldap_util.c_get_oid_session(flag);
2352: ret := user_exists(ldap,p_user_name);
2353: fnd_ldap_util.c_unbind(ldap,flag);
2354: return ret;
2355: end user_exists;
2356: --
2357: -------------------------------------------------------------------------------

Line 2371: retval := fnd_ldap_util.G_FAILURE;

2367: guid raw(16);
2368:
2369: begin
2370: l_module_source := G_MODULE_SOURCE || 'user_exists: ';
2371: retval := fnd_ldap_util.G_FAILURE;
2372: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2373: then
2374: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2375: end if;

Line 2379: retval := fnd_ldap_util.G_SUCCESS;

2375: end if;
2376:
2377: guid := get_user_guid(p_user_name);
2378: if (guid is not null ) then
2379: retval := fnd_ldap_util.G_SUCCESS;
2380: else
2381: retval :=fnd_ldap_util.G_FAILURE;
2382: end if;
2383:

Line 2381: retval :=fnd_ldap_util.G_FAILURE;

2377: guid := get_user_guid(p_user_name);
2378: if (guid is not null ) then
2379: retval := fnd_ldap_util.G_SUCCESS;
2380: else
2381: retval :=fnd_ldap_util.G_FAILURE;
2382: end if;
2383:
2384:
2385: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)

Line 2497: return fnd_ldap_util.G_FAILURE;

2493: if (fnd_log.LEVEL_UNEXPECTED >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2494: then
2495: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'END: refusing to validate empty username and/or password');
2496: end if;
2497: return fnd_ldap_util.G_FAILURE;
2498: end if;
2499:
2500: -- Find the DN of the linked guid
2501: begin

Line 2509: return fnd_ldap_util.G_FAILURE;

2505: then
2506: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'END: Null guid in FND_USER for: '||p_user_name);
2507: end if;
2508: fnd_message.set_name('FND','FND_SSO_NOT_LINKED');
2509: return fnd_ldap_util.G_FAILURE;
2510: end if;
2511: exception when no_data_found then
2512: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2513: then

Line 2517: return fnd_ldap_util.G_FAILURE;

2513: then
2514: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'END: user not found');
2515: end if;
2516: fnd_message.set_name('FND','FND_SSO_LOGIN_FAILED'); -- do no disclusre the real causeL
2517: return fnd_ldap_util.G_FAILURE;
2518: when others then
2519: if (fnd_log.LEVEL_UNEXPECTED >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2520: then
2521: fnd_log.string(fnd_log.LEVEL_UNEXPECTED ,l_module_source, 'END with exception: '||sqlcode||'-'||sqlerrm);

Line 2524: return fnd_ldap_util.G_FAILURE;

2520: then
2521: fnd_log.string(fnd_log.LEVEL_UNEXPECTED ,l_module_source, 'END with exception: '||sqlcode||'-'||sqlerrm);
2522: end if;
2523: fnd_message.set_name('FND','FND-9914'); -- unexpected error
2524: return fnd_ldap_util.G_FAILURE;
2525: end;
2526:
2527: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2528: then

Line 2535: user_dn := fnd_Ldap_util.get_dn_for_guid(l_user_guid); -- may raise no data found for invalid guids

2531:
2532:
2533: -- Obtain the user DN using the GUID
2534: begin
2535: user_dn := fnd_Ldap_util.get_dn_for_guid(l_user_guid); -- may raise no data found for invalid guids
2536: exception when no_data_found then
2537: if (fnd_log.LEVEL_UNEXPECTED >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2538: then
2539: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'Guid['||l_user_guid||'] for '||p_user_name||' is not a valid guid');

Line 2542: return fnd_ldap_util.G_FAILURE;

2538: then
2539: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'Guid['||l_user_guid||'] for '||p_user_name||' is not a valid guid');
2540: end if;
2541: fnd_message.set_name('FND','FND_SSO_USER_NOT_FOUND'); -- Carefull, this is INVALID GUID message, wrong acronym though
2542: return fnd_ldap_util.G_FAILURE;
2543: end;
2544:
2545: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2546: then

Line 2552: l_host := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_HOST);

2548: end if;
2549:
2550:
2551:
2552: l_host := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_HOST);
2553: l_port := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_PORT);
2554:
2555: if (l_host is null or l_port is null) then
2556: if (fnd_log.LEVEL_UNEXPECTED >= fnd_log.G_CURRENT_RUNTIME_LEVEL)

Line 2553: l_port := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_PORT);

2549:
2550:
2551:
2552: l_host := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_HOST);
2553: l_port := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_PORT);
2554:
2555: if (l_host is null or l_port is null) then
2556: if (fnd_log.LEVEL_UNEXPECTED >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2557: then

Line 2562: return fnd_ldap_util.G_FAILURE;

2558: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'Invalid OiD Setup: host:'||l_host||' port:'||l_port);
2559: end if;
2560:
2561: fnd_message.set_name('FND','FND-9903'); -- OID setup is incomplete
2562: return fnd_ldap_util.G_FAILURE;
2563: end if;
2564:
2565: l_ldap_auth := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBLDAPAUTHLEVEL);
2566:

Line 2565: l_ldap_auth := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBLDAPAUTHLEVEL);

2561: fnd_message.set_name('FND','FND-9903'); -- OID setup is incomplete
2562: return fnd_ldap_util.G_FAILURE;
2563: end if;
2564:
2565: l_ldap_auth := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBLDAPAUTHLEVEL);
2566:
2567: if (l_ldap_auth>0) then
2568: l_db_wlt_url := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETDIR);
2569: l_db_wlt_pwd := fnd_preference.eget(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETPASS, FND_LDAP_UTIL.G_LDAP_PWD);

Line 2568: l_db_wlt_url := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETDIR);

2564:
2565: l_ldap_auth := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBLDAPAUTHLEVEL);
2566:
2567: if (l_ldap_auth>0) then
2568: l_db_wlt_url := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETDIR);
2569: l_db_wlt_pwd := fnd_preference.eget(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETPASS, FND_LDAP_UTIL.G_LDAP_PWD);
2570: if (l_db_wlt_url is null or l_db_wlt_pwd is null) then
2571: if (fnd_log.LEVEL_UNEXPECTED >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2572: then

Line 2569: l_db_wlt_pwd := fnd_preference.eget(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETPASS, FND_LDAP_UTIL.G_LDAP_PWD);

2565: l_ldap_auth := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBLDAPAUTHLEVEL);
2566:
2567: if (l_ldap_auth>0) then
2568: l_db_wlt_url := fnd_preference.get(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETDIR);
2569: l_db_wlt_pwd := fnd_preference.eget(FND_LDAP_UTIL.G_INTERNAL, FND_LDAP_UTIL.G_LDAP_SYNCH, FND_LDAP_UTIL.G_DBWALLETPASS, FND_LDAP_UTIL.G_LDAP_PWD);
2570: if (l_db_wlt_url is null or l_db_wlt_pwd is null) then
2571: if (fnd_log.LEVEL_UNEXPECTED >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2572: then
2573: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'Invalid Wallet Setup: authLEvel:'

Line 2578: return fnd_ldap_util.G_FAILURE;

2574: ||l_ldap_auth||' url:'||l_db_wlt_url||' pwd:'||l_db_wlt_url);
2575: end if;
2576:
2577: fnd_message.set_name('FND','FND-9903'); -- OID setup is incomplete
2578: return fnd_ldap_util.G_FAILURE;
2579: end if;
2580: else
2581: if (fnd_log.LEVEL_STATEMENT>= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2582: then

Line 2598: return fnd_ldap_util.G_FAILURE;

2594: then
2595: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'Cannot contact OID (init failed) at '||l_host||':'||l_port||':'||sqlcode||'-'||sqlerrm);
2596: end if;
2597: fnd_message.set_name('FND','FND_SSO_SYSTEM_NOT_AVAIL');
2598: return fnd_ldap_util.G_FAILURE;
2599: when others then
2600: raise;
2601: end;
2602:

Line 2614: return fnd_ldap_util.G_FAILURE;

2610: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source,' Cannot establish SSL channel to OiD: '||sqlcode||'-'||sqlerrm);
2611: end if;
2612:
2613: fnd_message.set_name('FND','FND_SSO_INV_AUTH_MODE'); -- Invalid SSL authcode... it is enouggh description
2614: return fnd_ldap_util.G_FAILURE;
2615: end;
2616:
2617: if (fnd_log.LEVEL_STATEMENT>= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2618: then

Line 2688: return fnd_ldap_util.G_FAILURE;

2684: if (fnd_log.LEVEL_PROCEDURE>= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2685: then
2686: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'END: bind error: '||l_message);
2687: end if;
2688: return fnd_ldap_util.G_FAILURE;
2689: when others then
2690: if (fnd_log.LEVEL_UNEXPECTED>= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2691: then
2692: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'END: unexpected'||l_message);

Line 2694: return fnd_ldap_util.G_FAILURE;

2690: if (fnd_log.LEVEL_UNEXPECTED>= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2691: then
2692: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'END: unexpected'||l_message);
2693: end if;
2694: return fnd_ldap_util.G_FAILURE;
2695: end;
2696:
2697:
2698: l_retval:= dbms_ldap.unbind_s(ldapSession);

Line 2703: return fnd_ldap_util.G_SUCCESS;

2699: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2700: then
2701: fnd_log.string(fnd_log.LEVEL_PROCEDURE , l_module_source, 'END: Valid Username/password');
2702: end if;
2703: return fnd_ldap_util.G_SUCCESS;
2704:
2705: exception when others then
2706: if (fnd_log.LEVEL_UNEXPECTED>= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2707: then

Line 2711: return fnd_ldap_util.G_FAILURE;

2707: then
2708: fnd_log.string(fnd_log.LEVEL_UNEXPECTED, l_module_source, 'END: unexpected '||sqlcode||' - '||sqlerrm);
2709: end if;
2710: fnd_message.set_name('FND','FND-9914'); -- unexpected error
2711: return fnd_ldap_util.G_FAILURE;
2712: end validate_login;
2713:
2714: --
2715: -------------------------------------------------------------------------------