175: l_parameterList WF_PARAMETER_LIST_T;
176:
177: begin
178:
179: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
180: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE
181: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','BEGIN');
182: end if;
183: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
176:
177: begin
178:
179: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
180: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE
181: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','BEGIN');
182: end if;
183: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
184: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
179: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
180: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE
181: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','BEGIN');
182: end if;
183: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
184: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
185: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent',
186: 'userid='||NVL(p_user_id,'**NULL**')
187: ||' sessionId='||NVL(p_session_id,'**NULL*')
180: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE
181: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','BEGIN');
182: end if;
183: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
184: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
185: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent',
186: 'userid='||NVL(p_user_id,'**NULL**')
187: ||' sessionId='||NVL(p_session_id,'**NULL*')
188: );
206: begin
207: WF_EVENT.Raise(p_event_name=>'oracle.apps.icx.security.session.created',
208: p_event_key=>to_char(sysdate, 'HH:MI:SS'),
209: p_parameters=>l_parameterList);
210: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
211: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE
212: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','END');
213: end if;
214: exception
207: WF_EVENT.Raise(p_event_name=>'oracle.apps.icx.security.session.created',
208: p_event_key=>to_char(sysdate, 'HH:MI:SS'),
209: p_parameters=>l_parameterList);
210: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
211: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE
212: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','END');
213: end if;
214: exception
215: when others then
212: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','END');
213: end if;
214: exception
215: when others then
216: if( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
217: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED
218: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','END with errors '||sqlerrm);
219: end if;
220: null; -- allows login to continue if WF process not installed.
213: end if;
214: exception
215: when others then
216: if( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
217: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED
218: , 'fnd.plsql.FND_SESSION_MANAGEMENT.newSessionRaiseEvent','END with errors '||sqlerrm);
219: end if;
220: null; -- allows login to continue if WF process not installed.
221: end;
289: l_audit_level:=fnd_profile.value('SIGNONAUDIT:LEVEL');
290:
291: IF (l_audit_level is not null) THEN
292: FOR end_date_rec in c_end_date_fndlogins LOOP
293: fnd_signon.audit_end(l_login_id); -- end date FND_LOGINS
294: END LOOP;
295: END IF;
296:
297:
400: lm_key varchar2(40);
401: l_fixed_key varchar2(10);
402: l_module varchar2(100) := 'fnd.plsql.FND_SESSION_MANAGEMENT.createSessionPrivate';
403: begin
404: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
405: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'BEGIN');
406: end if;
407:
408: begin
401: l_fixed_key varchar2(10);
402: l_module varchar2(100) := 'fnd.plsql.FND_SESSION_MANAGEMENT.createSessionPrivate';
403: begin
404: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
405: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'BEGIN');
406: end if;
407:
408: begin
409: select node_id into l_node_id from fnd_nodes
422: fnd_profile.get_specific (name_z => 'ICX_SESSION_TIMEOUT',
423: user_id_z => p_user_id,
424: val_z => l_timeout,
425: defined_z => l_profile_defined);
426: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
427: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT , l_module||'.timeout',
428: 'timeout : ' || to_char(l_timeout) || ' User Id : ' || to_char (p_user_id));
429: end if;
430: -- end BUG 5354477
423: user_id_z => p_user_id,
424: val_z => l_timeout,
425: defined_z => l_profile_defined);
426: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
427: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT , l_module||'.timeout',
428: 'timeout : ' || to_char(l_timeout) || ' User Id : ' || to_char (p_user_id));
429: end if;
430: -- end BUG 5354477
431:
567: p_proxy_user);
568:
569: commit;
570:
571: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
572: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END');
573: end if;
574: return '0';
575: EXCEPTION WHEN OTHERS THEN
568:
569: commit;
570:
571: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
572: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END');
573: end if;
574: return '0';
575: EXCEPTION WHEN OTHERS THEN
576: if( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
572: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END');
573: end if;
574: return '0';
575: EXCEPTION WHEN OTHERS THEN
576: if( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
577: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED , l_module, 'Exception:'||sqlcode||' '||sqlerrm);
578: end if;
579: RAISE;
580: -- exception
573: end if;
574: return '0';
575: EXCEPTION WHEN OTHERS THEN
576: if( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
577: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED , l_module, 'Exception:'||sqlcode||' '||sqlerrm);
578: end if;
579: RAISE;
580: -- exception
581: -- when others then
603: l_module varchar2(200):= 'fnd.plsql.FND_SESSION_MANAGEMENT.createSession';
604:
605: begin
606:
607: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
608: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'BEGIN');
609: end if;
610: fnd_session_management.g_security_group_id := c_sec_grp_id;
611:
604:
605: begin
606:
607: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
608: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'BEGIN');
609: end if;
610: fnd_session_management.g_security_group_id := c_sec_grp_id;
611:
612:
623: then
624: newSessionRaiseEvent(p_user_id,l_session_id);
625: newSSOSession(p_user_id,l_session_id);
626:
627: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
628: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END->'||l_session_id);
629: end if;
630: return l_session_id;
631: else
624: newSessionRaiseEvent(p_user_id,l_session_id);
625: newSSOSession(p_user_id,l_session_id);
626:
627: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
628: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END->'||l_session_id);
629: end if;
630: return l_session_id;
631: else
632: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
628: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END->'||l_session_id);
629: end if;
630: return l_session_id;
631: else
632: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
633: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END->-1(l_message=0)');
634: end if;
635: return -1;
636: end if;
629: end if;
630: return l_session_id;
631: else
632: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
633: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END->-1(l_message=0)');
634: end if;
635: return -1;
636: end if;
637:
635: return -1;
636: end if;
637:
638: EXCEPTION WHEN OTHERS THEN
639: if( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
640: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED , l_module, 'Exception:'||sqlcode||' '||sqlerrm);
641: end if;
642: RAISE;
643: -- exception
636: end if;
637:
638: EXCEPTION WHEN OTHERS THEN
639: if( FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
640: FND_LOG.STRING(FND_LOG.LEVEL_UNEXPECTED , l_module, 'Exception:'||sqlcode||' '||sqlerrm);
641: end if;
642: RAISE;
643: -- exception
644: -- when others then
689: l_from_login_id NUMBER;
690: l_module varchar2(200):= 'fnd.plsql.FND_SESSION_MANAGEMENT.convertGuestSession';
691:
692: begin
693: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
694: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'BEGIN');
695: end if;
696: -- check if user exists
697: begin
690: l_module varchar2(200):= 'fnd.plsql.FND_SESSION_MANAGEMENT.convertGuestSession';
691:
692: begin
693: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
694: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'BEGIN');
695: end if;
696: -- check if user exists
697: begin
698: select user_id into l_user_id from fnd_user
701: (end_date is null or end_date>sysdate);
702: exception
703: when no_data_found then
704: rollback;
705: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
706: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> user not found');
707: end if;
708: return 'N';
709: end;
702: exception
703: when no_data_found then
704: rollback;
705: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
706: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> user not found');
707: end if;
708: return 'N';
709: end;
710: -- check if it is guest session
714: from icx_sessions
715: where xsid = p_session_id;
716: exception
717: when no_data_found then
718: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
719: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> session not found');
720: end if;
721: rollback;
722: return 'N';
715: where xsid = p_session_id;
716: exception
717: when no_data_found then
718: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
719: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> session not found');
720: end if;
721: rollback;
722: return 'N';
723: end;
722: return 'N';
723: end;
724: if (l_guest <> 'Y') then
725: rollback;
726: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
727: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> no guest session ');
728: end if;
729: return 'N';
730: end if;
723: end;
724: if (l_guest <> 'Y') then
725: rollback;
726: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
727: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> no guest session ');
728: end if;
729: return 'N';
730: end if;
731:
750:
751: if l_guest_user_id = p_user_id
752: then
753: rollback;
754: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
755: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> guest target user ');
756: end if;
757: return 'N';
758: end if;
751: if l_guest_user_id = p_user_id
752: then
753: rollback;
754: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
755: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE , l_module, 'END-> guest target user ');
756: end if;
757: return 'N';
758: end if;
759:
785: end if;
786: l_profile_defined := false;
787:
788:
789: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
790: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
791: , 'fnd.plsql.FND_SESSION_MANAGEMENT.convertGuestSession.timeout'
792: , 'timeout : ' || to_char(l_timeout) || ' User Id : ' || to_char (p_user_id)
793: || ' Resp ID: ' || to_char(l_resp_id)
786: l_profile_defined := false;
787:
788:
789: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
790: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
791: , 'fnd.plsql.FND_SESSION_MANAGEMENT.convertGuestSession.timeout'
792: , 'timeout : ' || to_char(l_timeout) || ' User Id : ' || to_char (p_user_id)
793: || ' Resp ID: ' || to_char(l_resp_id)
794: || ' Resp app ID : ' || to_char(l_resp_app_id));
809: l_limit_connects,
810: l_org_id,
811: l_timeout);
812:
813: -- Bug 6010245 Guest Login is not being end dated in FND_LOGINS.
814: -- AMGONZAL.
815:
816: l_audit_level:=fnd_profile.value('SIGNONAUDIT:LEVEL');
817: if (l_audit_level is not null) and ( l_from_login_id is not null) then
1566: defined_z => l_profile_defined);
1567: if ( l_user_id = 6) then -- Guest user has special rules for timeout.
1568: l_timeout := l_session_timeout;
1569: end if;
1570: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1571: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
1572: , 'fnd.plsql.FND_SESSION_MANAGEMENT.check_session.timeout'
1573: , 'timeout : ' || to_char(l_timeout) || ' User Id : ' || to_char (l_user_id)
1574: || ' Resp ID: ' || to_char(l_resp_id)
1567: if ( l_user_id = 6) then -- Guest user has special rules for timeout.
1568: l_timeout := l_session_timeout;
1569: end if;
1570: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1571: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
1572: , 'fnd.plsql.FND_SESSION_MANAGEMENT.check_session.timeout'
1573: , 'timeout : ' || to_char(l_timeout) || ' User Id : ' || to_char (l_user_id)
1574: || ' Resp ID: ' || to_char(l_resp_id)
1575: || ' Resp app ID : ' || to_char(l_app_resp_id));
1862: application_id_z => p_application_id,
1863: val_z => l_new_timeout,
1864: defined_z => l_profile_defined);
1865:
1866: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1867: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
1868: , 'fnd.plsql.FND_SESSION_MANAGEMENT.updateSessionContext.timeout'
1869: , 'Previous timeout : ' || to_char(l_prev_timeout)
1870: || 'New Timeout ' || to_char (l_new_timeout)
1863: val_z => l_new_timeout,
1864: defined_z => l_profile_defined);
1865:
1866: if( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
1867: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT
1868: , 'fnd.plsql.FND_SESSION_MANAGEMENT.updateSessionContext.timeout'
1869: , 'Previous timeout : ' || to_char(l_prev_timeout)
1870: || 'New Timeout ' || to_char (l_new_timeout)
1871: || ' Resp : ' || to_char(p_responsibility_id)
1986: l_login_id number;
1987:
1988: begin
1989:
1990: select fnd_logins_s.nextval
1991: into l_login_id
1992: from sys.dual;
1993:
1994:
2297: l_user_guid raw(256);
2298:
2299: BEGIN
2300:
2301: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2302: then
2303: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2304: end if;
2305:
2299: BEGIN
2300:
2301: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2302: then
2303: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2304: end if;
2305:
2306: if (p_user_id is null) then
2307: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2303: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Begin');
2304: end if;
2305:
2306: if (p_user_id is null) then
2307: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2308: then
2309: fnd_log.string(fnd_log.LEVEL_STATEMENT,l_module_source,'Userid not passed - get from session: '||to_char(p_session_id));
2310: end if;
2311:
2305:
2306: if (p_user_id is null) then
2307: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2308: then
2309: fnd_log.string(fnd_log.LEVEL_STATEMENT,l_module_source,'Userid not passed - get from session: '||to_char(p_session_id));
2310: end if;
2311:
2312: select user_id, time_out
2313: into l_user_id, l_session_timeout
2313: into l_user_id, l_session_timeout
2314: from icx_sessions
2315: where session_id = p_session_id;
2316:
2317: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2318: then
2319: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Userid from session is: '||to_char(l_user_id));
2320: end if;
2321: else
2315: where session_id = p_session_id;
2316:
2317: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2318: then
2319: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Userid from session is: '||to_char(l_user_id));
2320: end if;
2321: else
2322: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2323: then
2318: then
2319: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Userid from session is: '||to_char(l_user_id));
2320: end if;
2321: else
2322: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2323: then
2324: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'User id passed: '||to_char(p_user_id));
2325: end if;
2326:
2320: end if;
2321: else
2322: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2323: then
2324: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'User id passed: '||to_char(p_user_id));
2325: end if;
2326:
2327: l_user_id := p_user_id;
2328: end if;
2336: user_id_z => l_user_id,
2337: val_z => l_limit_sessions,
2338: defined_z => l_profile_defined);
2339:
2340: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2341: then
2342: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,'APPS_SSO_LIMIT_SESSIONS profile is '||l_limit_sessions);
2343: end if;
2344:
2338: defined_z => l_profile_defined);
2339:
2340: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2341: then
2342: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source,'APPS_SSO_LIMIT_SESSIONS profile is '||l_limit_sessions);
2343: end if;
2344:
2345: -- Handle disabling of local session on reauth of SSO user. If event is enabled local sessions should be limited
2346: newSessionRaiseEvent(l_user_id,p_session_id);
2345: -- Handle disabling of local session on reauth of SSO user. If event is enabled local sessions should be limited
2346: newSessionRaiseEvent(l_user_id,p_session_id);
2347:
2348: if (l_limit_sessions = 'Y') then
2349: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2350: then
2351: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Limiting SSO user session. Disable all but session id '||to_char(p_session_id));
2352: end if;
2353:
2347:
2348: if (l_limit_sessions = 'Y') then
2349: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2350: then
2351: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Limiting SSO user session. Disable all but session id '||to_char(p_session_id));
2352: end if;
2353:
2354: UPDATE icx_sessions
2355: SET last_connect=sysdate-2 -- May need to adjust this value
2359: AND disabled_flag = 'N';
2360:
2361: COMMIT;
2362: else
2363: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2364: then
2365: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Not limiting SSO user session - do nothing');
2366: end if;
2367: end if;
2361: COMMIT;
2362: else
2363: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2364: then
2365: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Not limiting SSO user session - do nothing');
2366: end if;
2367: end if;
2368:
2369: else
2366: end if;
2367: end if;
2368:
2369: else
2370: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2371: then
2372: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Not an SSO user - do nothing');
2373: end if;
2374: end if;
2368:
2369: else
2370: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2371: then
2372: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'Not an SSO user - do nothing');
2373: end if;
2374: end if;
2375:
2376: else
2374: end if;
2375:
2376: else
2377: -- Should never get here...
2378: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2379: then
2380: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'No user id found');
2381: end if;
2382:
2376: else
2377: -- Should never get here...
2378: if (fnd_log.LEVEL_STATEMENT >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2379: then
2380: fnd_log.string(fnd_log.LEVEL_STATEMENT, l_module_source, 'No user id found');
2381: end if;
2382:
2383: end if;
2384:
2381: end if;
2382:
2383: end if;
2384:
2385: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2386: then
2387: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'END');
2388: end if;
2389:
2383: end if;
2384:
2385: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
2386: then
2387: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'END');
2388: end if;
2389:
2390: EXCEPTION WHEN OTHERS THEN
2391: if( fnd_log.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2387: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'END');
2388: end if;
2389:
2390: EXCEPTION WHEN OTHERS THEN
2391: if( fnd_log.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2392: fnd_log.string(FND_LOG.LEVEL_UNEXPECTED , l_module_source, 'Exception:'||sqlcode||' '||sqlerrm);
2393: end if;
2394: raise;
2395: END;
2388: end if;
2389:
2390: EXCEPTION WHEN OTHERS THEN
2391: if( fnd_log.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
2392: fnd_log.string(FND_LOG.LEVEL_UNEXPECTED , l_module_source, 'Exception:'||sqlcode||' '||sqlerrm);
2393: end if;
2394: raise;
2395: END;
2396: