summaryrefslogblamecommitdiffstats
path: root/shib/api.php
blob: eec1e3de1a85f20342b4cca11b13d09603f77585 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                    
                                       




                                                                                             
   
 
                              


                                                  
<?php

chdir('..');

require_once 'config.php';

/*
Header('Content-Type: text/plain; charset=utf-8');
die( json_encode($_SERVER, JSON_PRETTY_PRINT) );

// */

// Autoload classes from ./inc which adhere to naming scheme <lowercasename>.inc.php
spl_autoload_register(function ($class)
{
	$file = 'inc/' . preg_replace('/[^a-z0-9]/', '', mb_strtolower($class)) . '.inc.php';
	if (!file_exists($file))
		return;
	require_once $file;
});

$response = ShibAuth::login();

Header('Content-Type: text/plain; charset=utf-8');
echo json_encode($response, JSON_PRETTY_PRINT);