aboutsummaryrefslogtreecommitdiff
path: root/actions/openid_client/login.php
blob: 5e7ad3aceee36027cdd7ca68ad308a9dab369a13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
 *
 */

elgg_load_library('openid_consumer');

$store = new Auth_OpenID_FileStore('/tmp');

$consumer = new ElggOpenIDConsumer($store);
$consumer->setProvider('google');
$consumer->setReturnURL(elgg_get_site_url() . 'mod/openid_client/return.php');

$html = $consumer->requestAuthentication();
if ($html) {
	echo $html;
	exit;
} else {
	register_error('oops');
}