aboutsummaryrefslogtreecommitdiff
path: root/mod/openid_server/server.php
blob: 7ebe70dd4d6883dec7263635c26788c28af7d9fd (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
<?php

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

if (elgg_get_viewtype() == 'xrds') {
	echo elgg_view_page($title, $body);
	exit(0);
}

$store = getOpenIDServerStore();

$server =& getServer();

$request = $server->decodeRequest();
setRequestInfo($request);

$action = getAction();
if (!function_exists($action)) {
    $action = 'action_default';
}

$resp = $action();
if (!empty($resp)) {
	writeResponse($resp);
} else {
	echo elgg_view_page($title, $body);
        exit(0);

}
?>