PHPackages                             satariall/lightopenid - 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. satariall/lightopenid

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

satariall/lightopenid
=====================

Lightweight PHP library for easy OpenID authentication.

1.3.4(6y ago)03.9k11MITPHPPHP &gt;7.0

Since Feb 20Pushed 6y agoCompare

[ Source](https://github.com/Satariall/LightOpenID)[ Packagist](https://packagist.org/packages/satariall/lightopenid)[ Docs](https://github.com/Satariall/LightOpenID)[ RSS](/packages/satariall-lightopenid/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (5)Used By (1)

LightOpenID
===========

[](#lightopenid)

Lightweight PHP library for easy OpenID authentication.

- `Version....:` [**1.3.4** ⏬](https://github.com/iignatov/LightOpenID/archive/master.zip)( *see [the change log](https://github.com/iignatov/LightOpenID/blob/master/CHANGELOG.md) for details* )
- `Released on:` April 09, 2020
- `Source code:` [Official GitHub Repo ![:octocat:](https://github.githubassets.com/images/icons/emoji/octocat.png ":octocat:")](https://github.com/Satariall/LightOpenID)
- `Homepage...:`
- `Authors....:` [Mewp](https://github.com/Mewp), [iignatov](https://github.com/iignatov/LightOpenID), [Satariall](https://github.com/Satariall/LightOpenID)

Quick start
-----------

[](#quick-start)

### Add to composer.json

[](#add-to-composerjson)

```
composer require satariall/lightopenid
```

### Sign-on with OpenID in just 2 steps:

[](#sign-on-with-openid-in-just-2-steps)

1. Authentication with the provider:

    ```
    $openid = new LightOpenID('my-host.example.org');

    $openid->identity = 'ID supplied by user';

    header('Location: ' . $openid->authUrl());
    ```
2. Verification:

    ```
    $openid = new LightOpenID('my-host.example.org');

    if ($openid->mode) {
      echo $openid->validate() ? 'Logged in.' : 'Failed!';
    }
    ```

### Support for AX and SREG extensions:

[](#support-for-ax-and-sreg-extensions)

To use the AX and SREG extensions, 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');
```

Note that if the server supports only SREG or OpenID 1.1, these are automaticaly mapped to SREG names. To get the values use:

```
$openid->getAttributes();
```

For more information see [USAGE.md](https://github.com/Satariall/LightOpenID/blob/master/USAGE.md).

Requirements
------------

[](#requirements)

This library requires PHP &gt;= 7.0 with cURL or HTTP/HTTPS stream wrappers enabled.

Features
--------

[](#features)

- Easy to use - you can code a functional client in less than ten lines of code.
- Uses cURL if avaiable, PHP-streams otherwise.
- Supports both OpenID 1.1 and 2.0.
- Supports Yadis discovery.
- Supports only stateless/dumb protocol.
- Works with PHP &gt;= 7.
- Generates no errors with `error_reporting(E_ALL | E_STRICT)`.

Links
-----

[](#links)

- [JavaScript OpenID Selector](http://code.google.com/p/openid-selector/) - simple user interface that can be used with LightOpenID.
- [HybridAuth](http://hybridauth.sourceforge.net/) - easy to install and use social sign on PHP library, which uses LightOpenID.
- [OpenID Dev Specifications](http://openid.net/developers/specs/) - documentation for the OpenID extensions and related topics.

License
-------

[](#license)

[LightOpenID](https://github.com/Satariall/LightOpenID)is an open source software available under the [MIT License](http://opensource.org/licenses/mit-license.php).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 89.8% of commits — single point of failure

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 ~506 days

Total

4

Last Release

2255d ago

PHP version history (2 changes)1.3.0PHP &gt;=5.2

1.3.2PHP &gt;7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/57b7f94151cd842370a545a9ffcb79962e7f1598169a1c3c8a15d5cd761d1e2a?d=identicon)[Satariall](/maintainers/Satariall)

---

Top Contributors

[![iignatov](https://avatars.githubusercontent.com/u/820242?v=4)](https://github.com/iignatov "iignatov (44 commits)")[![landas](https://avatars.githubusercontent.com/u/286139?v=4)](https://github.com/landas "landas (1 commits)")[![matejgleza](https://avatars.githubusercontent.com/u/4979665?v=4)](https://github.com/matejgleza "matejgleza (1 commits)")[![nhnb](https://avatars.githubusercontent.com/u/364184?v=4)](https://github.com/nhnb "nhnb (1 commits)")[![russor](https://avatars.githubusercontent.com/u/2165776?v=4)](https://github.com/russor "russor (1 commits)")[![vrana](https://avatars.githubusercontent.com/u/117453?v=4)](https://github.com/vrana "vrana (1 commits)")

---

Tags

securityAuthenticationOpenId

### Embed Badge

![Health badge](/badges/satariall-lightopenid/health.svg)

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

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k22.0M76](/packages/hwi-oauth-bundle)[hybridauth/hybridauth

PHP Social Authentication Library

3.4k8.8M104](/packages/hybridauth-hybridauth)[lusitanian/oauth

PHP 7.2 oAuth 1/2 Library

1.1k23.7M130](/packages/lusitanian-oauth)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40921.3M85](/packages/auth0-auth0-php)[opauth/opauth

Multi-provider authentication framework for PHP

1.6k793.0k60](/packages/opauth-opauth)[auth0/login

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

2745.2M3](/packages/auth0-login)

PHPackages © 2026

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