PHP Class Larabros\Elogram\Helpers\RedirectLoginHelper

Afficher le fichier Open project: larabros/elogram

Protected Properties

Свойство Type Description
$provider Larabros\Elogram\Http\OAuth2\Providers\AdapterInterface
$store Larabros\Elogram\Http\Sessions\DataStoreInterface

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
getInput ( string $key ) : string | null Retrieves and returns a value from a GET param.
validateCsrf ( ) Validates any CSRF parameters.

Method Details

__construct() public méthode

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() public méthode

Validates CSRF and returns the access token.
See also: League\OAuth2\Client\Provider\AbstractProvider::getAccessToken()
public getAccessToken ( string $code, string $grant = 'authorization_code' ) : League\OAuth2\Client\Token\AccessToken
$code string
$grant string
Résultat League\OAuth2\Client\Token\AccessToken

getInput() protected méthode

Retrieves and returns a value from a GET param.
protected getInput ( string $key ) : string | null
$key string
Résultat string | null

getLoginUrl() public méthode

Sets CSRF value and returns the login URL.
See also: League\OAuth2\Client\Provider\AbstractProvider::getAuthorizationUrl()
public getLoginUrl ( array $options = [] ) : string
$options array
Résultat string

validateCsrf() protected méthode

Validates any CSRF parameters.
protected validateCsrf ( )

Property Details

$provider protected_oe property

protected AdapterInterface,Larabros\Elogram\Http\OAuth2\Providers $provider
Résultat Larabros\Elogram\Http\OAuth2\Providers\AdapterInterface

$store protected_oe property

protected DataStoreInterface,Larabros\Elogram\Http\Sessions $store
Résultat Larabros\Elogram\Http\Sessions\DataStoreInterface