* function myCallback($request, $params, $key = null) * { * return true; * } * * * @const SIGNED_REQUEST_CALLBACK */ const SIGNED_REQUEST_CALLBACK = 'RPC_GATEWAY_SIGNED_REQUEST_CALLBACK'; /** * secret salt for creating api keys */ const SALT_KEY = 'RPC_GATEWAY_SALT'; } /** * Default Gateway options */ $XAPP_GATEWAY_OPTIONS = array( Xapp_Rpc_Gateway_Options::SIGNED_REQUEST => true, Xapp_Rpc_Gateway_Options::OMIT_ERROR => true, Xapp_Rpc_Gateway_Options::SIGNED_REQUEST_METHOD => 'user', Xapp_Rpc_Gateway_Options::SIGNED_REQUEST_SIGN_PARAM => 'sig', Xapp_Rpc_Gateway_Options::SALT_KEY => 'k?Ur$0aE#9j1+7ui' ); /******************************************************************************* * * Example : Load security config from Ini - File: **/ /* xapp_import('xapp.Config.Ini'); $iniFilePath = realpath($ROOT_DIRECTORY_ABSOLUTE .'/profiles/default/security.ini'); $_XAPP_GATEWAY_OPTIONS_INI_CONF = new Xapp_Config_Ini($iniFilePath);//will throw an error if it doesnt exists $_XAPP_GATEWAY_OPTIONS_INI_CONF->load($iniFilePath); //example read a parameter in the ini file: //$omit = $_XAPP_GATEWAY_OPTIONS_INI_CONF->get(Xapp_Rpc_Gateway_Options::OMIT_ERROR); //example in case the parameter is in a ini Section: //$omit = $_XAPP_GATEWAY_OPTIONS_INI_CONF->get('Default'. Xapp_Rpc_Gateway_Options::OMIT_ERROR); // set $XAPP_GATEWAY_OPTIONS to the Config-Instance: $XAPP_GATEWAY_OPTIONS = $_XAPP_GATEWAY_OPTIONS_INI_CONF; */