Skip to content

Commit

Permalink
Add Katsana\Socialite\Passport.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Apr 2, 2019
1 parent 2c9b49e commit 4ead6e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/Passport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Katsana\Socialite;

use SocialiteProviders\Manager\OAuth2\User;

class Passport extends User
{
//
}
4 changes: 2 additions & 2 deletions src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ protected function getUserByToken($token)
*
* @param array $user
*
* @return \Laravel\Socialite\Two\User
* @return \Katsana\Socialite\Passport
*/
protected function mapUserToObject(array $user)
{
return (new User())->setRaw($user)->map([
return (new Passport())->setRaw($user)->map([
'id' => $user['id'],
'name' => $user['fullname'],
'email' => $user['email'],
Expand Down

0 comments on commit 4ead6e4

Please sign in to comment.