Download the PHP package valentinbv/wialon-php-oauth without Composer
On this page you can find all versions of the php package valentinbv/wialon-php-oauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download valentinbv/wialon-php-oauth
More information about valentinbv/wialon-php-oauth
Files in valentinbv/wialon-php-oauth
Download valentinbv/wialon-php-oauth
More information about valentinbv/wialon-php-oauth
Files in valentinbv/wialon-php-oauth
Please rate this library. Is it a good library?
Informations about the package wialon-php-oauth
wialon-php-oauth
Wialon-php-oauth allows authorization on the Wialon Remote API server in accordance with the documentation on the oauth protocol.
For example, in first, get authorize url:
$authHelper = new valentinbv\WialonOAuth\OAuthHelper(
'https://your-api-server.com/login.html
);
$authHelper->setRedirectUri('https://your-redirect-url.com/');
$authHelper->getAuthorizationUrl();
When you have access token, you can login:
if ($_GET['access_token']) {
$httpClient = new GuzzleHttp\Client();
$auth = new valentinbv\WialonOAuth\OAuthClient($httpClient);
try {
$auth->setToken($_GET['access_token']);
$result = $auth->login();
} catch(\Exception $e) {
echo $e->getMessage();
}
}
The $result array contains the result of the query to the wialon server according to the documentation https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/token/login
For install from packagist
composer require valentinbv/wialon-php-oauth
For install from git add to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ValentinBV/wialon-php-oauth.git"
}
],
"require": {
"valentinbv/wialon-php-oauth": "dev-master"
}
}
All versions of wialon-php-oauth with dependencies
PHP Build Version
Package Version
The package valentinbv/wialon-php-oauth contains the following files
Loading the files please wait ....