v2.1.4: Merge SSO changes to upgrade to Oauth2.0 (#43)
* Bumps version to 2.1.4 * Updates Pathfinder Database schema to store new AccessTokens * Updates SSO login flow to work with JWT Access Tokens * Updates ESI API client dependency to use goryn-clade/pathfinder_esi:v2.1.2
This commit is contained in:
@@ -100,7 +100,7 @@ class CharacterModel extends AbstractPathfinderModel {
|
||||
'default' => ''
|
||||
],
|
||||
'esiAccessToken' => [
|
||||
'type' => Schema::DT_VARCHAR256
|
||||
'type' => Schema::DT_TEXT
|
||||
],
|
||||
'esiAccessTokenExpires' => [
|
||||
'type' => Schema::DT_TIMESTAMP,
|
||||
@@ -1186,13 +1186,13 @@ class CharacterModel extends AbstractPathfinderModel {
|
||||
$ssoController = new Sso();
|
||||
if(
|
||||
!empty( $verificationCharacterData = $ssoController->verifyCharacterData($accessToken) ) &&
|
||||
$verificationCharacterData['characterId'] === $this->_id
|
||||
$verificationCharacterData->characterId === $this->_id
|
||||
){
|
||||
// get character data from API
|
||||
$characterData = $ssoController->getCharacterData($this->_id);
|
||||
if( !empty($characterData->character) ){
|
||||
$characterData->character['ownerHash'] = $verificationCharacterData['characterOwnerHash'];
|
||||
$characterData->character['esiScopes'] = $verificationCharacterData['scopes'];
|
||||
$characterData->character['ownerHash'] = $verificationCharacterData->owner;
|
||||
$characterData->character['esiScopes'] = $verificationCharacterData->scp;
|
||||
|
||||
$this->copyfrom($characterData->character, ['ownerHash', 'esiScopes', 'securityStatus']);
|
||||
$this->corporationId = $characterData->corporation;
|
||||
|
||||
Reference in New Issue
Block a user