Download the PHP package goodid/goodid-php-sdk without Composer
On this page you can find all versions of the php package goodid/goodid-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download goodid/goodid-php-sdk
More information about goodid/goodid-php-sdk
Files in goodid/goodid-php-sdk
Package goodid-php-sdk
Short Description GoodID SDK for PHP
License MIT
Homepage https://github.com/idandtrust/goodid-php-sdk
Informations about the package goodid-php-sdk
GoodID SDK for PHP
This repository contains our open source PHP SDK that allows you to collect, decrypt and verify the data that you receive from the user.
Note: This version of the GoodID SDK for PHP requires PHP 5.6 or greater.
Installation
The GoodID PHP SDK can be installed with Composer. Add the GoodID PHP SDK package to your composer.json
file.
Prerequisites
To provide GoodID login to your users, you need to register at GoodID first. You will receive the followings:
- GoodID mobile app download link
- client id
- client secret
- default keypairs
- suggested claimset
At this point, you also have the chance to generate your own keypairs and send the public key to GoodID.
Download the GoodID app:
The GoodID login flow
This is a short introduction to the GoodID login flow, to let you know what is the purpose of the endpoints (detailed in the "Endpoints to be implemented" section) that you need to implement.
Brief overview of the GoodID login flow:
- The Javascript SDK is only responsible to render the "Sign in with GoodID" button. Read more
- When the user clicks on the "Sign in with GoodID" button the user agent is navigated to the GoodID Login Initiation Endpoint .
- The GoodID Login Initiation Endpoint builds the "Authorization Request" and redirects to the GoodID Authorization EP with the request in the url.
- The user receives the request into the GoodID mobile app and answers that.
- Finally the user is redirected to your Redirect URI (Landing page), with "code" and "state" parameters that are used by the GoodID PHP SDK to collect, decrypt and verify the information provided by the user.
Endpoints to be implemented
GoodID Login Initiation Endpoint
The so-called GoodID Login Initiation endpoint is a designated endpoint for GoodID. It is analogous to the OpenID Connect Login Initiation endpoint and it is responsible to generate the OpenID authentication request.
You don't have to handle GET/POST parameters, or write a response, this is all done automatically by the GoodID Endpoint that is instantiated in the code snippet.
Redirect URI (Landing page)
The user answers therequest with the GoodID mobile application and redirected to your your so-called Redirect URI. The SDK collects, decrypts and verifies the response.
Miscellaneous
These steps may be useful at certain steps of the integration.
Generating your own keypairs
If you wish to generate your own keypairs, it is possible as follows, with openssl Installing openssl for Ubuntu:
Generating keypairs:
Please send us the followings:
- The new public keypairs (.pub files).
- The request object signed by the new key.
Generating the content of your JWKs URI
Your JWKs URI contains your public keys (signing and ecryption) in JSON format (JWK).
If you don't have a JWKs URI yet, you can generate its content like this:
All versions of goodid-php-sdk with dependencies
ext-openssl Version *
ext-json Version *
paragonie/random_compat Version ^1|^2
jwadhams/json-logic-php Version ^1.3
spomky-labs/base64url Version ^1.0
web-token/jwt-framework Version ^3.3 || ^2.2