diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 41862017d..eff6f2397 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -1165,14 +1165,9 @@ class Bootstrap if (array_key_exists('alias', $apiIniConf)) { foreach ($apiIniConf['alias'] as $alias => $namespace) { $namespace = '\\' . ltrim($namespace, '\\'); - var_dump("$namespace, $alias"); $rest->addAPIClass($namespace, $alias); } } - //var_dump($apiIniConf);die; - - //$rest->addAPIClass('\Services\Api\ProcessMaker\Test'); - //$rest->addAPIClass('\Services\Api\ProcessMaker\Test2','test'); $rest->handle(); } diff --git a/workflow/engine/methods/oauth2/authorize.php b/workflow/engine/methods/oauth2/authorize.php index bd6a9894b..4e0d37570 100644 --- a/workflow/engine/methods/oauth2/authorize.php +++ b/workflow/engine/methods/oauth2/authorize.php @@ -9,15 +9,15 @@ switch ($_SERVER['REQUEST_METHOD']) { break; case 'POST': - require_once PATH_CORE . 'services/oauth2/Server.php'; + require_once PATH_CORE . 'src/Services/Api/OAuth2/Server.php'; list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, ''); $port = empty($port) ? '' : ";port=$port"; - \Api\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port); - \Api\OAuth2\Server::setPmClientId('x-pm-local-client'); + \Services\Api\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port); + \Services\Api\OAuth2\Server::setPmClientId('x-pm-local-client'); - $oauthServer = new \Api\OAuth2\Server(); + $oauthServer = new \Services\Api\OAuth2\Server(); $userid = $_SESSION['USER_LOGGED']; $authorize = isset($_POST['authorize']) ? (bool) $_POST['authorize'] : false; diff --git a/workflow/engine/templates/oauth2/authorize.php b/workflow/engine/templates/oauth2/authorize.php index 9e2704d27..821ee9c61 100644 --- a/workflow/engine/templates/oauth2/authorize.php +++ b/workflow/engine/templates/oauth2/authorize.php @@ -1,5 +1,5 @@ scope = array( ); // $dsn is the Data Source Name for your database, for exmaple "mysql:dbname=my_oauth2_db;host=localhost" -$storage = new Api\OAuth2\PmPdo(array('dsn' => $dsn, 'username' => $username, 'password' => $password)); +$storage = new Services\Api\OAuth2\PmPdo(array('dsn' => $dsn, 'username' => $username, 'password' => $password));