1 package APP_SESSION AUTHID CURRENT_USER as
2 /* $Header: AFSCSESS.pls 120.2 2005/10/11 18:38:09 sdstratt noship $ */
3
4 --
5 -- Exceptions
6 --
7 SSO_USER_UNKNOWN exception;
8 SESSION_CREATION_FAILED exception;
9 SESSION_DOES_NOT_EXIST exception;
10 SESSION_NOT_VALID exception;
11 SESSION_EXPIRED exception;
12 SECURITY_CONTEXT_INVALID exception;
13
14 --
15 -- Types
16 --
17 type Apps_User_Type is record (
18 user_id fnd_user.user_id%type, -- Apps User ID
19 user_name fnd_user.user_name%type, -- Apps User Name
20 default_user varchar2(1) -- Y/N default user for GUID
21 );
22
23 type Apps_User_Table is table of Apps_User_Type
24 index by binary_integer;
25
26 --
27 -- Initialize
28 -- Initialize session in apps schema
29 --
30 procedure Initialize;
31
32 --
33 -- Get_Icx_Cookie_Name
34 -- Get the name of the cookie containing the icx_session_id
35 -- RETURNS
36 -- Cookie Name
37 --
38 function Get_Icx_Cookie_Name return varchar2;
39
40 --
41 -- Create_Icx_Session
42 -- Create or re-establish an ICX session for the identified user.
43 -- IN
44 -- p_sso_guid - the user's SSO guid (required)
45 -- p_old_icx_cookie_value - the user's previous cookie value, if
46 -- trying to re-establish an existing session (optional)
47 -- p_resp_appl_short_name - the application short name of the responsibility
48 -- p_responsibility_key - the responsibility key
49 -- p_security_group_key - the security group key
50 -- OUT
51 -- p_icx_cookie_value - the new ICX session cookie value
52 -- RAISES
53 -- SSO_USER_UNKNOWN - if there is no user corresponding to the SSO guid
54 -- SESSION_CREATION_FAILED - if a session could not be created
55 -- SECURITY_CONTEXT_INVALID - if the user, responsibility application
56 -- short name, responsibility, and security group do not form a valid
57 -- security context
58 --
59 procedure Create_Icx_Session(
60 p_sso_guid in varchar2,
61 p_old_icx_cookie_value in varchar2 default null,
62 p_resp_appl_short_name in varchar2 default null,
63 p_responsibility_key in varchar2 default null,
64 p_security_group_key in varchar2 default null,
65 p_icx_cookie_value out nocopy varchar2);
66
67 --
68 -- Validate_Icx_Session
69 -- Validates an ICX session.
70 -- IN
71 -- p_icx_cookie_value - the ICX session cookie value
72 -- RETURNS
73 -- Nothing. No exception means session is valid.
74 -- RAISES
75 -- SESSION_DOES_NOT_EXIST
76 -- SESSION_NOT_VALID
77 -- SESSION_EXPIRED
78 --
79 procedure Validate_Icx_Session(
80 p_icx_cookie_value in varchar2);
81
82 --
83 -- Get_All_Linked_Users
84 -- Return a list of all FND users linked to an SSO guid
85 -- IN
86 -- p_sso_guid - the user's SSO guid (required)
87 -- RETURNS
88 -- An array of users linked to this guid
89 -- RAISES
90 -- SSO_USER_UNKNOWN - if no users are linked to this GUID
91 --
92 function Get_All_Linked_Users(
93 p_sso_guid in varchar2)
94 return Apps_User_Table;
95
96 --
97 -- Get_Default_User
98 -- Get the default FND user linked to an SSO guid
99 -- IN
100 -- p_sso_guid - the user's SSO guid (required)
101 -- RETURNS
102 -- A record for default user linked to this guid
103 -- RAISES
104 -- SSO_USER_UNKNOWN - if no users are linked to this GUID
105 --
106 function Get_Default_User(
107 p_sso_guid in varchar2)
108 return Apps_User_Type;
109
110 end APP_SESSION;