PHP Класс Larabros\Elogram\Helpers\RedirectLoginHelper

Автор: Hassan Khan ([email protected])
Показать файл Открыть проект

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

Свойство Тип Описание
$provider Larabros\Elogram\Http\OAuth2\Providers\AdapterInterface
$store Larabros\Elogram\Http\Sessions\DataStoreInterface

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

Метод Описание
__construct ( Larabros\Elogram\Http\OAuth2\Providers\AdapterInterface $provider, Larabros\Elogram\Http\Sessions\DataStoreInterface $store ) Creates an instance of :php:class:RedirectLoginHelper.
getAccessToken ( string $code, string $grant = 'authorization_code' ) : League\OAuth2\Client\Token\AccessToken Validates CSRF and returns the access token.
getLoginUrl ( array $options = [] ) : string Sets CSRF value and returns the login URL.

Защищенные методы

Метод Описание
getInput ( string $key ) : string | null Retrieves and returns a value from a GET param.
validateCsrf ( ) Validates any CSRF parameters.

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

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

Creates an instance of :php:class:RedirectLoginHelper.
public __construct ( Larabros\Elogram\Http\OAuth2\Providers\AdapterInterface $provider, Larabros\Elogram\Http\Sessions\DataStoreInterface $store )
$provider Larabros\Elogram\Http\OAuth2\Providers\AdapterInterface
$store Larabros\Elogram\Http\Sessions\DataStoreInterface

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

Validates CSRF and returns the access token.
См. также: League\OAuth2\Client\Provider\AbstractProvider::getAccessToken()
public getAccessToken ( string $code, string $grant = 'authorization_code' ) : League\OAuth2\Client\Token\AccessToken
$code string
$grant string
Результат League\OAuth2\Client\Token\AccessToken

getInput() защищенный Метод

Retrieves and returns a value from a GET param.
protected getInput ( string $key ) : string | null
$key string
Результат string | null

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

Sets CSRF value and returns the login URL.
См. также: League\OAuth2\Client\Provider\AbstractProvider::getAuthorizationUrl()
public getLoginUrl ( array $options = [] ) : string
$options array
Результат string

validateCsrf() защищенный Метод

Validates any CSRF parameters.
protected validateCsrf ( )

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

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

protected AdapterInterface,Larabros\Elogram\Http\OAuth2\Providers $provider
Результат Larabros\Elogram\Http\OAuth2\Providers\AdapterInterface

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

protected DataStoreInterface,Larabros\Elogram\Http\Sessions $store
Результат Larabros\Elogram\Http\Sessions\DataStoreInterface