aboutsummaryrefslogtreecommitdiffstats
path: root/library/openid/README
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
commit0a98f6b878ec89be7282621192d9daf80f125e6c (patch)
tree718a4771ce1fb86931531226898b0b5d00e4a337 /library/openid/README
parent34d30e4d7eb48bd801482531a0d775328bd43ab4 (diff)
parentb1021df485fb6129acda5bba616bac10aea75a45 (diff)
downloadvolse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.gz
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.bz2
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.zip
Merge pull request #1 from friendica/master
Update this fork
Diffstat (limited to 'library/openid/README')
-rw-r--r--library/openid/README49
1 files changed, 49 insertions, 0 deletions
diff --git a/library/openid/README b/library/openid/README
new file mode 100644
index 000000000..799b452ac
--- /dev/null
+++ b/library/openid/README
@@ -0,0 +1,49 @@
+This class provides a simple interface for OpenID (1.1 and 2.0) authentication.
+Supports Yadis discovery.
+
+The authentication process is stateless/dumb.
+
+Usage:
+Sign-on with OpenID is a two step process:
+Step one is authentication with the provider:
+<code>
+$openid = new LightOpenID('my-host.example.org');
+$openid->identity = 'ID supplied by user';
+header('Location: ' . $openid->authUrl());
+</code>
+
+The provider then sends various parameters via GET, one of them is openid_mode.
+Step two is verification:
+<code>
+if ($this->data['openid_mode']) {
+ $openid = new LightOpenID('my-host.example.org');
+ echo $openid->validate() ? 'Logged in.' : 'Failed';
+}
+</code>
+ *
+Change the 'my-host.example.org' to your domain name. Do NOT use $_SERVER['HTTP_HOST']
+for that, unless you know what you are doing.
+ *
+Optionally, you can set $returnUrl and $realm (or $trustRoot, which is an alias).
+The default values for those are:
+$openid->realm = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
+$openid->returnUrl = $openid->realm . $_SERVER['REQUEST_URI'];
+If you don't know their meaning, refer to any openid tutorial, or specification. Or just guess.
+ *
+AX and SREG extensions are supported.
+To use them, specify $openid->required and/or $openid->optional before calling $openid->authUrl().
+These are arrays, with values being AX schema paths (the 'path' part of the URL).
+For example:
+ $openid->required = array('namePerson/friendly', 'contact/email');
+ $openid->optional = array('namePerson/first');
+If the server supports only SREG or OpenID 1.1, these are automaticaly
+mapped to SREG names, so that user doesn't have to know anything about the server.
+ *
+To get the values, use $openid->getAttributes().
+ *
+The library requires PHP >= 5.1.2 with curl or http/https stream wrappers enabled.
+@author Mewp
+@contributors Brice http://github.com/brice/
+@copyright Copyright (c) 2010, Mewp
+@copyright Copyright (c) 2010, Brice
+@license http://www.opensource.org/licenses/mit-license.php MIT \ No newline at end of file