2017 © Pedro Peláez
 

library php-openid

OpenID library for PHP5

image

openid/php-openid

OpenID library for PHP5

  • Saturday, June 16, 2018
  • by marcoceppi
  • Repository
  • 62 Watchers
  • 718 Stars
  • 251,007 Installations
  • PHP
  • 12 Dependents
  • 0 Suggesters
  • 265 Forks
  • 55 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

PHP OpenID

This is the PHP OpenID library by JanRain, Inc. You can visit our website for more information about this package and other OpenID implementations and tools:, (*1)

http://www.openidenabled.com/, (*2)

Getting Started

First, run the examples/detect.php script either from the command line or via the web. It will generate a report of any system configuration changes necessary to run the library., (*3)

Installation

You will need PHP 5.6.0 or greater to use this library., (*4)

Follow these steps:, (*5)

  1. Install dependencies.
  • Enable either the GMP extension or Bcmath extension. (GMP is STRONGLY recommended because it's MUCH faster!) This is required., (*6)

  • Enable the CURL extension., (*7)

  • If you plan to use SQLite, PostgreSQL, or MySQL to store OpenID data, you'll need PEAR MDB2. You can install this by running this as root:, (*8)

    bash pear install MDB2, (*9)

    You'll also need to install and enable the appropriate PHP database extension. Alternatively, you can store OpenID data on the filesystem instead of using a relational database. Nothing special is required for using the filesystem method., (*10)

  • Install either the DOM or domxml PHP XML processing extension, but not both (they are incompatible)., (*11)

  1. Copy the Auth/ directory into your PHP include path.

Testing Your Setup

You can use the example code to test your setup. To run the example consumer or server, follow the instructions in the examples/README.md file., (*12)

Using the API

The best way to get started using the API is to take a look at the example consumer and server in the examples/ directory. See the examples/README.md file for more details., (*13)

Troubleshooting

  • If you're unable to use an OpenID URL with the library, you may want to try using the discover tool (examples/discover.php). This tool will perform OpenID discovery on the identifier and give a list of discovered OpenID services and their types., (*14)

  • On some systems, PHP basedir restrictions prevent web servers from opening a source of randomness, such as /dev/urandom. If your PHP OpenID library has trouble getting a satisfactory source of randomness, check your Apache and PHP configurations to be sure that the randomness source is in the list of allowed paths for the open_basedir option., (*15)

  • In some cases, bugs in the GMP math library will result in signature validation errors when using this library. Since GMP is preferred over bcmath (for performance), you will have to define Auth_OpenID_BUGGY_GMP in your application before importing any of the library code:, (*16)

define('Auth_OpenID_BUGGY_GMP', true);
  • Not all PHP installations support SSL. You can find out if yours supports SSL by reading the "HTTP Fetching" section of the output of examples/detect.php. If your installation does not support SSL, then https:// identity URLs and server URLs will not be supported by the library. An attempt to use such an identity URL will be equivalent to using an invalid OpenID. To enable SSL support, recompile PHP with OpenSSL support or install the appropriate OpenSSL module for your platform. If you are using CURL, CURL will need to be built with OpenSSL support.

Getting Help

If you have any questions, recommendations, or patches, please tell us! Subscribe to our OpenID development discussion list at, (*17)

https://openid.net/developers/dev-mailing-lists/, (*18)

Documentation

You can view the HTML library documentation in the doc/ directory., (*19)

This package's documentation is in PhpDoc format. To generate the documentation, install phpdoc and run the admin/makedoc.sh script. Phpdoc lives at:, (*20)

https://www.phpdoc.org/, (*21)

Contributing

If you have a bugfix or feature you'd like to contribute, don't hesitate to send it to us. Post your patch to the development list at, (*22)

https://openid.net/developers/dev-mailing-lists/, (*23)

For more detailed information on how to contribute, see, (*24)

http://openidenabled.com/contribute/, (*25)

To run the test suite included with this package, install PHPUnit 1.x and run, (*26)

php admin/texttest.php

PHPUnit 1.x can be found at, (*27)

http://pear.phpunit.de/get/, (*28)

The Versions

16/06 2018

dev-master

9999999-dev http://github.com/openid/php-openid

OpenID library for PHP5

  Sources   Download

Apache-2.0

The Requires

  • ext-gmp *
  • ext-curl *
  • ext-dom *
  • php >=5.6

 

authentication auth openid yadis

30/07 2015

2.3.0

2.3.0.0 http://github.com/openid/php-openid

OpenID library for PHP5

  Sources   Download

Apache-2.0

The Requires

  • php >=4.3
  • ext-gmp *
  • ext-curl *
  • ext-dom *

 

authentication auth openid yadis