oauth v2 token
This commit is contained in:
@@ -84,7 +84,7 @@ class LoginController extends Controller
|
|||||||
public function handleProviderCallback() {
|
public function handleProviderCallback() {
|
||||||
//Get the sso user from the socialite driver
|
//Get the sso user from the socialite driver
|
||||||
$ssoUser = Socialite::driver('eveonline')->user();
|
$ssoUser = Socialite::driver('eveonline')->user();
|
||||||
|
dd($ssoUser);
|
||||||
if(Auth::check()) {
|
if(Auth::check()) {
|
||||||
//If a refresh token is present, then we are doing a scope callback
|
//If a refresh token is present, then we are doing a scope callback
|
||||||
//to update scopes for an access token
|
//to update scopes for an access token
|
||||||
|
|||||||
@@ -52,25 +52,15 @@ class EveOnlineOAuthProvider extends AbstractProvider implements ProviderInterfa
|
|||||||
*/
|
*/
|
||||||
protected function mapUserToObject(array $user) {
|
protected function mapUserToObject(array $user) {
|
||||||
|
|
||||||
dd($user);
|
|
||||||
|
|
||||||
return (new User)->setRaw($user)->map([
|
return (new User)->setRaw($user)->map([
|
||||||
'id' => $user['CharacterID'],
|
'id' => $user['CharacterID'],
|
||||||
'name' => $user['CharacterName'],
|
'name' => $user['CharacterName'],
|
||||||
'owner_hash' => $user['CharacterOwnerHash'],
|
'nickname' => $user['CharacterName'],
|
||||||
|
'character_owner_hash' => $user['CharacterOwnerHash'],
|
||||||
'avatar' => 'https://image.eveonline.com/Character/' . $user['CharacterID'] . '_128.jpg',
|
'avatar' => 'https://image.eveonline.com/Character/' . $user['CharacterID'] . '_128.jpg',
|
||||||
|
'token_type' => $user['TokenType'],
|
||||||
|
'expires_on' => $user['ExpiresOn'],
|
||||||
]);
|
]);
|
||||||
/*
|
|
||||||
return (new User)->setRaw($user)->map([
|
|
||||||
'id' => $character_id,
|
|
||||||
'name' => $user['name'],
|
|
||||||
'nickname' => $user['name'],
|
|
||||||
'character_owner_hash' => $user['owner'],
|
|
||||||
'scopes' => is_array($user['scp']) ? $user['scp'] : [$user['scp']],
|
|
||||||
'expires_on' => $user['exp'],
|
|
||||||
'avatar' => $avatar,
|
|
||||||
]);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user