raegmaen/openid-connect-php
OpenID Connect client
Maintainers
0.2.1
2018-11-21 13:28 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- kelvinmo/simplejwt: ^0.1.6
- phpseclib/phpseclib: 2.0.1
- psr/simple-cache: ^1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
Apache-2.0 96612f0ee819e6135ba52c0de97ceec85e4924d0
This package is not auto-updated.
Last update: 2026-06-21 13:57:11 UTC
README
PHP library to authenticate users against an identity provider using the OpenId Connect protocol.
Use cases implemented:
- Authentication using the Authorization Code Flow
- Refreshing access token with refresh token
Requirements
- PHP 5.6 or greater
- CURL extension
- JSON extension
Install
Composer
composer require raegmaen/openid-connect-php
License
Example:
$openIdConnectClient = OpenIdConnectFactory::create( $providerUrl, $clientId, $clientSecret, $callbackUrl ); $authenticationResult = $this->openIdConnectClient->authenticate($requestData); if ($authenticationResult instanceof UserRedirect) { // Redirect user to given Url } $claims = $authenticationResult->getIdToken()->getClaims(); $name = $claims->get('given_name');
