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
Size: 10
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
An OpenID Connect claims set implementation
Via Composer
mposer require league/openid-connect-claims
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"
}
Please see CHANGELOG for more information what has changed recently.
mposer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email hello@alexbilbie.com
instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.