thephpleague/openid-connect-claims

Name: openid-connect-claims

Owner: The League of Extraordinary Packages

Description: An OpenID Connect ID claims set implementation

Created: 2016-05-26 11:41:26.0

Updated: 2017-10-23 21:36:37.0

Pushed: 2016-05-26 14:29:34.0

Homepage:

Size: 10

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

league/openid-connect-claims

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

An OpenID Connect claims set implementation

Install

Via Composer

mposer require league/openid-connect-claims
Usage
ims = new \League\OpenIdConnectClaims\ClaimsSet();
ims->setIdentifier(123);
ims->setFirstName('Alex');
ims->setLastName('Bilbie');
ims->setNickname('Alex');
ims->setUsername('alexbilbie');
ims->setProfileUrl('http://twitter.com/alexbilbie');
ims->setPictureUrl('https://s.gravatar.com/avatar/14902eb1dac66b8458ebbb481d80f0a3');
ims->setWebsite('http://alexbilbie.com');
ims->setEmail('hello@alexbilbie.com');
ims->setEmailVerified(true);
ims->setGender('male');
ims->setBirthDate('YYYY', 'MM', 'DD');
ims->setZoneInfo('Europe/London');
ims->setLocale('en_GB');
ims->setPhoneNumber('0303 123 7300');
ims->setPhoneNumberVerified(true);
ims->setAddressStreet('Buckingham Palace');
ims->setAddressRegion('London');
ims->setAddressPostalCode('SW1A 1AA');
ims->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

Please see CHANGELOG for more information what has changed recently.

Testing
mposer test
Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

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

Credits
License

The MIT License (MIT). Please see License File for more information.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.