- BC Break: Project folder structure changed. Removed `app/main` dir. - BC Break: Core _PHP_ framework + dependencies moved into `composer.json` and are no longer part of this repo
40 lines
834 B
PHP
40 lines
834 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: Exodus 4D
|
|
* Date: 26.12.2018
|
|
* Time: 17:39
|
|
*/
|
|
|
|
namespace Exodus4D\Pathfinder\Lib\Api;
|
|
|
|
use Exodus4D\Pathfinder\Lib\Config;
|
|
use Exodus4D\ESI\Client\ApiInterface;
|
|
use Exodus4D\ESI\Client\Ccp\Sso\Sso as Client;
|
|
|
|
/**
|
|
* Class SsoClient
|
|
* @package lib\api
|
|
*/
|
|
class SsoClient extends AbstractClient {
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
const CLIENT_NAME = 'ssoClient';
|
|
|
|
/**
|
|
* @param \Base $f3
|
|
* @return ApiInterface|null
|
|
*/
|
|
protected function getClient(\Base $f3) : ?ApiInterface {
|
|
$client = null;
|
|
if(class_exists(Client::class)){
|
|
$client = new Client(Config::getEnvironmentData('CCP_SSO_URL'));
|
|
}else{
|
|
$this->getLogger()->write($this->getMissingClassError(Client::class));
|
|
}
|
|
|
|
return $client;
|
|
}
|
|
} |