PHP Класс BookStack\Services\SocialAuthService

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$socialAccount
$socialite
$userRepo
$validSocialDrivers

Открытые методы

Метод Описание
__construct ( UserRepo $userRepo, Laravel\Socialite\Contracts\Factory $socialite, SocialAccount $socialAccount ) SocialAuthService constructor.
detachSocialAccount ( $socialDriver ) : Illuminate\Http\RedirectResponse | Redirector Detach a social account from a user.
fillSocialAccount ( string $socialDriver, Laravel\Socialite\Contracts\User $socialUser ) : SocialAccount
getActiveDrivers ( ) : array Gets the names of the active social drivers.
handleLoginCallback ( $socialDriver ) : Illuminate\Http\RedirectResponse | Redirector Handle the login process on a oAuth callback.
handleRegistrationCallback ( $socialDriver ) : Laravel\Socialite\Contracts\User Handle the social registration process on callback.
startLogIn ( string $socialDriver ) : RedirectResponse Start the social login path.
startRegister ( string $socialDriver ) : RedirectResponse Start the social registration process

Приватные методы

Метод Описание
checkDriverConfigured ( $driver ) : boolean Check a social driver has been configured correctly.
logUserIn ( $user )
validateDriver ( $socialDriver ) : string Ensure the social driver is correct and supported.

Описание методов

__construct() публичный Метод

SocialAuthService constructor.
public __construct ( UserRepo $userRepo, Laravel\Socialite\Contracts\Factory $socialite, SocialAccount $socialAccount )
$userRepo BookStack\Repos\UserRepo
$socialite Laravel\Socialite\Contracts\Factory
$socialAccount BookStack\SocialAccount

detachSocialAccount() публичный Метод

Detach a social account from a user.
public detachSocialAccount ( $socialDriver ) : Illuminate\Http\RedirectResponse | Redirector
$socialDriver
Результат Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector

fillSocialAccount() публичный Метод

public fillSocialAccount ( string $socialDriver, Laravel\Socialite\Contracts\User $socialUser ) : SocialAccount
$socialDriver string
$socialUser Laravel\Socialite\Contracts\User
Результат BookStack\SocialAccount

getActiveDrivers() публичный Метод

Gets the names of the active social drivers.
public getActiveDrivers ( ) : array
Результат array

handleLoginCallback() публичный Метод

Handle the login process on a oAuth callback.
public handleLoginCallback ( $socialDriver ) : Illuminate\Http\RedirectResponse | Redirector
$socialDriver
Результат Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector

handleRegistrationCallback() публичный Метод

Handle the social registration process on callback.
public handleRegistrationCallback ( $socialDriver ) : Laravel\Socialite\Contracts\User
$socialDriver
Результат Laravel\Socialite\Contracts\User

startLogIn() публичный Метод

Start the social login path.
public startLogIn ( string $socialDriver ) : RedirectResponse
$socialDriver string
Результат Symfony\Component\HttpFoundation\RedirectResponse

startRegister() публичный Метод

Start the social registration process
public startRegister ( string $socialDriver ) : RedirectResponse
$socialDriver string
Результат Symfony\Component\HttpFoundation\RedirectResponse

Описание свойств

$socialAccount защищенное свойство

protected $socialAccount

$socialite защищенное свойство

protected $socialite

$userRepo защищенное свойство

protected $userRepo

$validSocialDrivers защищенное свойство

protected $validSocialDrivers