PHPackages                             openid/php-openid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. openid/php-openid

AbandonedArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

openid/php-openid
=================

OpenID library for PHP5

3.0.3(5y ago)7591.3M—10%2529Apache-2.0PHPPHP &gt;=5.6

Since Jul 30Pushed 3y ago63 watchersCompare

[ Source](https://github.com/openid/php-openid)[ Packagist](https://packagist.org/packages/openid/php-openid)[ Docs](http://github.com/openid/php-openid)[ RSS](/packages/openid-php-openid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (6)Used By (9)Security (1)

PHP OpenID
==========

[](#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:

Getting Started
---------------

[](#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.

Installation
------------

[](#installation)

You will need **PHP 5.6.0 or greater** to use this library.

Follow these steps:

1. Install dependencies.

    - Enable either the **GMP extension or Bcmath extension**. (GMP is STRONGLY recommended because it's MUCH faster!) This is required.
    - Enable the **CURL extension**.
    - 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:

        ```
        pear install MDB2
        ```

        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.
    - Install either the **DOM or domxml PHP XML processing extension**, but not both (they are incompatible).
2. Copy the `Auth/` directory into your PHP include path.

Testing Your Setup
------------------

[](#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.

Using the API
-------------

[](#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.

Troubleshooting
---------------

[](#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.
- 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.
- 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:

```
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
------------

[](#getting-help)

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

Documentation
-------------

[](#documentation)

You can view the HTML library documentation in the `doc/` directory.

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

Contributing
------------

[](#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

For more detailed information on how to contribute, see

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

```
php admin/texttest.php
```

PHPUnit 1.x can be found at

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity62

Solid adoption and visibility

Community43

Growing community involvement

Maturity62

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~485 days

Total

5

Last Release

2005d ago

Major Versions

2.3.0 → 3.0.02020-01-17

PHP version history (2 changes)2.3.0PHP &gt;=4.3

3.0.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e31f248e2bcc8bb9f7917cf2ccf493675e8232865f6315d4c613b8de3234282?d=identicon)[marcoceppi](/maintainers/marcoceppi)

---

Top Contributors

[![marcoceppi](https://avatars.githubusercontent.com/u/70613?v=4)](https://github.com/marcoceppi "marcoceppi (34 commits)")[![willnorris](https://avatars.githubusercontent.com/u/1112?v=4)](https://github.com/willnorris "willnorris (10 commits)")[![indeyets](https://avatars.githubusercontent.com/u/13445?v=4)](https://github.com/indeyets "indeyets (5 commits)")[![tjohns](https://avatars.githubusercontent.com/u/9989?v=4)](https://github.com/tjohns "tjohns (5 commits)")[![brianellin](https://avatars.githubusercontent.com/u/54411?v=4)](https://github.com/brianellin "brianellin (4 commits)")[![arty-name](https://avatars.githubusercontent.com/u/133055?v=4)](https://github.com/arty-name "arty-name (3 commits)")[![liayn](https://avatars.githubusercontent.com/u/222377?v=4)](https://github.com/liayn "liayn (3 commits)")[![olavmo-sikt](https://avatars.githubusercontent.com/u/98447575?v=4)](https://github.com/olavmo-sikt "olavmo-sikt (3 commits)")[![harningt](https://avatars.githubusercontent.com/u/3589?v=4)](https://github.com/harningt "harningt (2 commits)")[![JonTheNiceGuy](https://avatars.githubusercontent.com/u/228671?v=4)](https://github.com/JonTheNiceGuy "JonTheNiceGuy (2 commits)")[![cakebaker](https://avatars.githubusercontent.com/u/26196?v=4)](https://github.com/cakebaker "cakebaker (2 commits)")[![etienneq](https://avatars.githubusercontent.com/u/3263670?v=4)](https://github.com/etienneq "etienneq (2 commits)")[![filips123](https://avatars.githubusercontent.com/u/16626308?v=4)](https://github.com/filips123 "filips123 (2 commits)")[![chuckpearce](https://avatars.githubusercontent.com/u/1541560?v=4)](https://github.com/chuckpearce "chuckpearce (1 commits)")[![dho](https://avatars.githubusercontent.com/u/24664?v=4)](https://github.com/dho "dho (1 commits)")[![mmcev106](https://avatars.githubusercontent.com/u/2627854?v=4)](https://github.com/mmcev106 "mmcev106 (1 commits)")[![nao-pon](https://avatars.githubusercontent.com/u/1412630?v=4)](https://github.com/nao-pon "nao-pon (1 commits)")[![nikolasco](https://avatars.githubusercontent.com/u/9636?v=4)](https://github.com/nikolasco "nikolasco (1 commits)")[![tixpaul](https://avatars.githubusercontent.com/u/1334858?v=4)](https://github.com/tixpaul "tixpaul (1 commits)")[![ozahorulia](https://avatars.githubusercontent.com/u/3076280?v=4)](https://github.com/ozahorulia "ozahorulia (1 commits)")

---

Tags

authAuthenticationOpenIdyadis

### Embed Badge

![Health badge](/badges/openid-php-openid/health.svg)

```
[![Health](https://phpackages.com/badges/openid-php-openid/health.svg)](https://phpackages.com/packages/openid-php-openid)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M68](/packages/auth0-auth0-php)[opauth/opauth

Multi-provider authentication framework for PHP

1.6k783.4k58](/packages/opauth-opauth)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[kreait/firebase-tokens

A library to work with Firebase tokens

24040.8M14](/packages/kreait-firebase-tokens)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
