informunity / rest-auth-service-php-lib
Installs: 189
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/informunity/rest-auth-service-php-lib
Requires
- php: >=7.1
- ext-json: *
- guzzlehttp/guzzle: ^7.0
This package is auto-updated.
Last update: 2025-10-11 13:45:52 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