aboutsummaryrefslogtreecommitdiff
path: root/server.php
blob: 8898126141f015087dff8c7ca217a3cbd54ba000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

require_once('openid_server_include.php');
require_once 'lib/session.php';
require_once 'lib/actions.php';

error_log('translations: '.print_r($CONFIG->translations,true));

error_log('in server.php - trying to get server $_SESSION = '.print_r($_SESSION,true));
$store = getOpenIDServerStore();

$server =& getServer();

error_log('in server.php - trying to decode request, action='.getAction());

$request = $server->decodeRequest();
//error_log('in server.php - request:'.print_r($request,true));
setRequestInfo($request);
error_log('in server.php - after setRequestInfo');
$action = getAction();
if (!function_exists($action)) {
    $action = 'action_default';
}

error_log('in server.php - dispatching action '.$action);

$resp = $action();

writeResponse($resp);
/*if (isloggedin()) {
    error_log('in server.php - about to forward');
    forward($CONFIG->wwwroot.'mod/openid_server/actions/trust.php');
} else {
    error_log('in server.php - not logged in');
    system_message(elgg_echo('openid_server:not_logged_in'));
    forward();
}*/

?>