Skip to content
Snippets Groups Projects
Commit adc9df8b authored by Jared Hancock's avatar Jared Hancock
Browse files

api: Use sessions for API — required for SSO

parent 790d4cd7
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,8 @@ file_exists('../main.inc.php') or die('System Error');
// Disable sessions for the API. API should be considered stateless and
// shouldn't chew up database records to store sessions
define('DISABLE_SESSION', true);
if (!defined('DISABLE_SESSION'))
define('DISABLE_SESSION', true);
require_once('../main.inc.php');
require_once(INCLUDE_DIR.'class.http.php');
......
......@@ -13,6 +13,10 @@
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
// Use sessions — it's important for SSO authentication, which uses
// /api/auth/ext
define('DISABLE_SESSION', false);
require 'api.inc.php';
# Include the main api urls
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment