aboutsummaryrefslogtreecommitdiffstats
path: root/library/openid/example-google.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/openid/example-google.php')
-rw-r--r--library/openid/example-google.php24
1 files changed, 0 insertions, 24 deletions
diff --git a/library/openid/example-google.php b/library/openid/example-google.php
deleted file mode 100644
index f23f2cc48..000000000
--- a/library/openid/example-google.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-# Logging in with Google accounts requires setting special identity, so this example shows how to do it.
-require 'openid.php';
-try {
- # Change 'localhost' to your domain name.
- $openid = new LightOpenID('localhost');
- if(!$openid->mode) {
- if(isset($_GET['login'])) {
- $openid->identity = 'https://www.google.com/accounts/o8/id';
- header('Location: ' . $openid->authUrl());
- }
-?>
-<form action="?login" method="post">
- <button>Login with Google</button>
-</form>
-<?php
- } elseif($openid->mode == 'cancel') {
- echo 'User has canceled authentication!';
- } else {
- echo 'User ' . ($openid->validate() ? $openid->identity . ' has ' : 'has not ') . 'logged in.';
- }
-} catch(ErrorException $e) {
- echo $e->getMessage();
-}