aboutsummaryrefslogtreecommitdiff
path: root/actions/openid_client/login.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/openid_client/login.php')
-rw-r--r--actions/openid_client/login.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/actions/openid_client/login.php b/actions/openid_client/login.php
new file mode 100644
index 000000000..5e7ad3ace
--- /dev/null
+++ b/actions/openid_client/login.php
@@ -0,0 +1,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');
+}