informunity / rest-auth-service-php-lib
There is no license information available for the latest version (1.0.1) of this package.
1.0.1
2022-08-11 06:25 UTC
Requires
- php: >=7.1
- ext-json: *
- guzzlehttp/guzzle: ^7.0
This package is auto-updated.
Last update: 2025-07-11 13:07:27 UTC
README
Установка
composer require informunity/rest-auth-service-php-lib
Использование
инстанцировать клиент, токен и урл берем в keyrights
$restAuthClient = new \InformUnity\RestAuth\Client([ "token" => "lQ461D4FXn2WxiuWECIzzCjaedKBz3sH2S22GgKk", "baseUrl" => "https://7f63f29a1b5063.lhrtunnel.link/api/", ]);
сохранить авторизационные rest данные
$restAuthClient->saveTokens([ "appCode" => "informunity.my_great_app", "memberId" => "1d3629bea8b123we2ss365ae1e16e6e1", "accessToken" => "123123123123123123123123123123", "refreshToken" => "23452345345345345345345345345", ]); // true
получить access_token
$restAuthClient->getAccessToken([ "appCode" => "informunity.my_great_app", "memberId" => "1d3629bea8b123we2ss365ae1e16e6e1", ]); // "123123123123123123123123123123"
Прочее
- настроен repository mirroring в корпоративный github