create or replace package wsgsec is -- --------------------------------------------------------------------- -- Security API functions -- These functions may be called from generated WSG applications. --------------------------------------------------------------------- -- -- Get_User: Returns user name of current user. -- function get_user return varchar2; pragma restrict_references (get_user, WNDS, WNPS); -- -- -- Get_User_Data: Returns information about a user, specified by -- p_key. This implementation accepts the key -- 'PASSWORD' only. Any other key will result in -- a null string being returned. -- function get_user_data( p_key in varchar2 ) return varchar2; -- -- -- Security_Check: Returns true if the currently logged on user is -- allowed access to the specified package. If not, -- will return false. This function will also provide -- a means for the user to log on. -- function security_check( p_package_name in varchar2 ) return boolean; -- -- -- Add_Package_Resp: Adds a respondibility to a package, allowing users -- with that responsibility to access the application. -- This is called from the generated application -- installation script if a value is supplied for -- preference SECRES. -- procedure add_package_resp( p_package_name in varchar2 , p_responsibility in varchar2 ); -- -------------------------------------------------------------------------- -- Implementation specific functions -- These functions are used only by this implementation of the -- security package. -------------------------------------------------------------------------- -- -- Show_Logon_Form: Renders logon form -- procedure show_logon_form( p_embedded in boolean default false); -- -- -- Process_Logon: Accepts submitted logon form and logs user on. If logon -- fails then notifies user. -- procedure process_logon( p_username in varchar2 , p_password in varchar2 ); -- -- -- Show_No_Access: Displays message to inform user that they do not -- have access to the application. Provides a link -- to the logon form. -- procedure show_no_access; -- -- -- Call_Logon_Form: Output HTML to call the logon form, which -- may be in a separate window. -- procedure call_logon_form; -- -- -- Logoff: Removes the current user's session, logging them off. Outputs -- HTML message when complete. -- procedure logoff; -- -- -- Create_User: Creates a user with the specified name and password -- procedure create_user( p_username in varchar2 , p_password in varchar2 ); -- end wsgsec; /