Skip to content

Commit

Permalink
feat(core): Allow Eseye to use alternative SSO endpoint (#47)
Browse files Browse the repository at this point in the history
CCP is working hard to make Tranquility ESI compliant together with
Serenity reborn.

According to CCP Bartender, they're targetting a
maximum of 48 hours delay between Tranquility updates and Serenity
updates.

In despite that we already allow alternative ESI and source
endpoints, we're still use hardcoded SSO endpoint which is not possible
with Serenity Architecture.

Base ESI would be https://esi.evepc.163.com
and the OAuth path should be https://login.evepc.163.com (according to
actual documentation)

Closes eveseat/seat#550
  • Loading branch information
warlof authored Apr 22, 2019
1 parent a9a0a6d commit 55a90cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Containers/EsiConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@ class EsiConfiguration extends AbstractArrayAccess
*/
protected $data = [
'http_user_agent' => 'Eseye Default Library',

// Esi
'datasource' => 'tranquility',
'esi_scheme' => 'https',
'esi_host' => 'esi.evetech.net',
'esi_port' => 443,

// Eve Online SSO
'sso_scheme' => 'https',
'sso_host' => 'login.eveonline.com',
'sso_port' => 443,

// Fetcher
'fetcher' => GuzzleFetcher::class,

Expand Down
6 changes: 5 additions & 1 deletion src/Fetchers/GuzzleFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class GuzzleFetcher implements FetcherInterface
/**
* @var string
*/
protected $sso_base = 'https://login.eveonline.com/oauth';
protected $sso_base;

/**
* EseyeFetcher constructor.
Expand All @@ -75,6 +75,10 @@ public function __construct(EsiAuthentication $authentication = null)

// Setup the logger
$this->logger = Configuration::getInstance()->getLogger();
$this->sso_base = sprintf('%s://%s:%d/oauth',
Configuration::getInstance()->sso_scheme,
Configuration::getInstance()->sso_host,
Configuration::getInstance()->sso_port);
}

/**
Expand Down

0 comments on commit 55a90cc

Please sign in to comment.