gsdevme / jumpcloud
Simple library to authenicate with Jumpclouds REST Authorization API.
1.5.0
2016-08-01 19:14 UTC
Requires
- php: >=5.6
- doctrine/collections: ^1.3
- guzzlehttp/guzzle: ^6.2
- psr/log: ^1.0
- webmozart/json: ~1.2
Requires (Dev)
- mockery/mockery: ^0.9.4
- phpunit/phpunit: ^5.3
- squizlabs/php_codesniffer: ^2.6
This package is auto-updated.
Last update: 2024-12-10 07:33:08 UTC
README
Jumpcloud API
Master
Develop
Authorization API
http://support.jumpcloud.com/knowledgebase/articles/455570
API
https://github.com/TheJumpCloud/JumpCloudAPI
Examples
<?php
require __DIR__ . '/../vendor/autoload.php';
use Jumpcloud\Model\JumpcloudCredentials;
use Jumpcloud\Request\IsAuthenticatedRequest;
use Gsdev\Fabric\Bridge\Guzzle\GuzzleClient;
use Jumpcloud\Response\IsAuthenticatedResponse;
$client = new GuzzleClient();
$credentials = new JumpcloudCredentials(getenv('JUMPCLOUD_API_KEY'));
$request = new IsAuthenticatedRequest($credentials, 'username', 'password1234');
$response = $client->send($request);
if ($response instanceof IsAuthenticatedResponse && $response->isAuthenticated()) {
echo 'Authenticated';
} else {
echo 'Not Authenticated';
}