PHPackages                             league/openid-connect-claims - 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. league/openid-connect-claims

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

league/openid-connect-claims
============================

An OpenID Connect ID claims set implementation

1.1.0(9y ago)15242.9k↓25.4%1[1 issues](https://github.com/thephpleague/openid-connect-claims/issues)1MITPHP

Since May 26Pushed 9y ago5 watchersCompare

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

READMEChangelog (1)DependenciesVersions (4)Used By (1)

league/openid-connect-claims
============================

[](#leagueopenid-connect-claims)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cc49f467066b3dd13d0f3258fe3332625f2d73bdede65461b41e16c349d875b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c65616775652f6f70656e69642d636f6e6e6563742d636c61696d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/openid-connect-claims)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/e3e8394a5a40d3dc076d2b1ff93921ac49f2cd9a3b0b3fa55b623a34e346cd0b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c65616775652f6f70656e69642d636f6e6e6563742d636c61696d732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/league/openid-connect-claims)[![Coverage Status](https://camo.githubusercontent.com/59671f378bd4d1979d21f93d74584dfe6a74ca0ad628711326868a4550edaa94/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c65616775652f6f70656e69642d636f6e6e6563742d636c61696d732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/league/openid-connect-claims/code-structure)[![Quality Score](https://camo.githubusercontent.com/b7b3c4b89803820333111625cae3ab2fe5f2d80af9335c87d816c34ccc8b213d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c65616775652f6f70656e69642d636f6e6e6563742d636c61696d732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/league/openid-connect-claims)[![Total Downloads](https://camo.githubusercontent.com/89cfc4904857709dcc92ed2abc187e864443e1c3688d149efe199c38bbc63666/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f6f70656e69642d636f6e6e6563742d636c61696d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/openid-connect-claims)

An [OpenID Connect](http://openid.net/specs/openid-connect-core-1_0.html) claims set implementation

Install
-------

[](#install)

Via Composer

```
$ composer require league/openid-connect-claims
```

Usage
-----

[](#usage)

```
$claims = new \League\OpenIdConnectClaims\ClaimsSet();
$claims->setIdentifier(123);
$claims->setFirstName('Alex');
$claims->setLastName('Bilbie');
$claims->setNickname('Alex');
$claims->setUsername('alexbilbie');
$claims->setProfileUrl('http://twitter.com/alexbilbie');
$claims->setPictureUrl('https://s.gravatar.com/avatar/14902eb1dac66b8458ebbb481d80f0a3');
$claims->setWebsite('http://alexbilbie.com');
$claims->setEmail('hello@alexbilbie.com');
$claims->setEmailVerified(true);
$claims->setGender('male');
$claims->setBirthDate('YYYY', 'MM', 'DD');
$claims->setZoneInfo('Europe/London');
$claims->setLocale('en_GB');
$claims->setPhoneNumber('0303 123 7300');
$claims->setPhoneNumberVerified(true);
$claims->setAddressStreet('Buckingham Palace');
$claims->setAddressRegion('London');
$claims->setAddressPostalCode('SW1A 1AA');
$claims->setAddressCountry('United Kingdom');
```

When the ClaimsSet object is JSON encoded you will get an object similar to this:

```
{
    "sub": "123",
    "name": "Alex Bilbie",
    "given_name": "Alex",
    "family_name": "Bilbie",
    "nickname": "Alex",
    "preferred_username": "alexbilbie",
    "profile": "http:\/\/twitter.com\/alexbilbie",
    "picture": "https:\/\/s.gravatar.com\/avatar\/14902eb1dac66b8458ebbb481d80f0a3",
    "website": "http:\/\/alexbilbie.com",
    "email": "hello@alexbilbie.com",
    "email_verified": true,
    "gender": "male",
    "birthdate": "YYYY-MM-DD",
    "zoneinfo": "Europe\/London",
    "locale": "en_GB",
    "phone_number": "0303 123 7300",
    "phone_number_verified": true,
    "address": {
        "street_address": "Buckingham Palace",
        "region": "London",
        "postal_code": "SW1A 1AA",
        "country": "United Kingdom"
    }
}
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email `hello@alexbilbie.com` instead of using the issue tracker.

Credits
-------

[](#credits)

- [Alex Bilbie](https://github.com/alexbilbie)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

3644d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a5327d87a2a2d37a9412d5706442399763d86cb773f81adbe58c8d749393e2d?d=identicon)[alexbilbie](/maintainers/alexbilbie)

---

Top Contributors

[![alexbilbie](https://avatars.githubusercontent.com/u/77991?v=4)](https://github.com/alexbilbie "alexbilbie (8 commits)")

---

Tags

jwtauthoauthoauth2oauth 2.0oauth 2OpenIdOpenID Connectclaim

### Embed Badge

![Health badge](/badges/league-openid-connect-claims/health.svg)

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

###  Alternatives

[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)[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)[auth0/wordpress

WordPress Plugin for Auth0

17419.5k](/packages/auth0-wordpress)[chervand/yii2-oauth2-server

OAuth 2.0 server for Yii 2.0 with MAC tokens support.

1524.2k1](/packages/chervand-yii2-oauth2-server)

PHPackages © 2026

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