PHP Class App\Http\Controllers\OauthController

Inheritance: extends Laravel\Lumen\Routing\Controller
Afficher le fichier Open project: unicodeveloper/laravel-hackathon-starter

Protected Properties

Свойство Type Description
$auth
$socialite

Méthodes publiques

Méthode Description
__construct ( Laravel\Socialite\Contracts\Factory $socialite, Illuminate\Contracts\Auth\Guard $auth )
authenticate ( Illuminate\Http\Request $request, $provider )
checkIfUserNeedsUpdating ( $userData, $user ) Check if the user's info needs updating
execute ( $request, $provider )
findByProviderIdOrCreate ( $userData, $provider ) : User Find a user by username or create a new user

Private Methods

Méthode Description
getAuthorizationFirst ( $provider ) : RedirectResponse Redirect the user to the Social Media Account authentication page
getSocialUser ( string $provider ) : collection Get Data from Social Media Account
isEmailExists ( $email = null )
isUsernameExists ( $username = null )

Method Details

__construct() public méthode

public __construct ( Laravel\Socialite\Contracts\Factory $socialite, Illuminate\Contracts\Auth\Guard $auth )
$socialite Laravel\Socialite\Contracts\Factory
$auth Illuminate\Contracts\Auth\Guard

authenticate() public méthode

public authenticate ( Illuminate\Http\Request $request, $provider )
$request Illuminate\Http\Request

checkIfUserNeedsUpdating() public méthode

Check if the user's info needs updating
public checkIfUserNeedsUpdating ( $userData, $user )
$userData
$user

execute() public méthode

public execute ( $request, $provider )

findByProviderIdOrCreate() public méthode

Find a user by username or create a new user
public findByProviderIdOrCreate ( $userData, $provider ) : User
$userData
$provider
Résultat app\User

Property Details

$auth protected_oe property

protected $auth

$socialite protected_oe property

protected $socialite