dnxcorp / sso-sdk
SSO SDK for PHP
dev-master
2024-07-05 07:56 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2025-06-05 10:15:56 UTC
README
Introduction
This SDK is a collection of libraries that allow you to interact with the SSO API. The SDK is available only for PHP8.2 and above.
Installation
To install the SDK, you can use composer. Run the following command:
composer require dnxcorp/sso-sdk
Usage
// $myUser is your user object $token = 'your_token'; $client = new Client($token); $response = $client->register('email@test.com', '127.0.0.1', 'FR', 'en', 'c0023'); if ($response->isSuccess()) { $myUser->setLoginToken($response->getLoginToken()); // Persist changes in database, it won't be displayed anymore } // Redirect to the website header('Location: ' . $response->getRedirectUrl());