PHP Class WellCommerce\Bundle\OAuthBundle\Security\FacebookAuthenticator

Inheritance: extends Symfony\Component\Security\Guard\AbstractGuardAuthenticator
Afficher le fichier Open project: wellcommerce/wellcommerce

Protected Properties

Свойство Type Description
$appId string
$appSecret string
$clientManager WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface
$facebookProvider League\OAuth2\Client\Provider\Facebook
$routerHelper WellCommerce\Bundle\CoreBundle\Helper\Router\RouterHelperInterface

Méthodes publiques

Méthode Description
__construct ( WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface $clientManager, WellCommerce\Bundle\CoreBundle\Helper\Router\RouterHelperInterface $routerHelper, string $appId, string $appSecret ) FacebookAuthenticator constructor.
checkCredentials ( $credentials, Symfony\Component\Security\Core\User\UserInterface $user )
createAuthenticatedToken ( Symfony\Component\Security\Core\User\UserInterface $user, string $providerKey ) : UsernamePasswordToken
getCredentials ( Request $request )
getProvider ( ) : League\OAuth2\Client\Provider\Facebook
getUser ( $authorizationCode, Symfony\Component\Security\Core\User\UserProviderInterface $userProvider )
onAuthenticationFailure ( Request $request, Symfony\Component\Security\Core\Exception\AuthenticationException $exception ) : RedirectResponse Scheme used after authentification fails
onAuthenticationSuccess ( Request $request, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, string $providerKey ) : RedirectResponse Scheme used after authentification succeeds
start ( Request $request, Symfony\Component\Security\Core\Exception\AuthenticationException $authException = null ) : RedirectResponse Starts the authentication scheme.
supportsRememberMe ( ) : boolean

Méthodes protégées

Méthode Description
autoRegisterClient ( League\OAuth2\Client\Provider\FacebookUser $facebookUser ) : WellCommerce\Bundle\ClientBundle\Entity\ClientInterface Automatic register process

Method Details

__construct() public méthode

FacebookAuthenticator constructor.
public __construct ( WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface $clientManager, WellCommerce\Bundle\CoreBundle\Helper\Router\RouterHelperInterface $routerHelper, string $appId, string $appSecret )
$clientManager WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface
$routerHelper WellCommerce\Bundle\CoreBundle\Helper\Router\RouterHelperInterface
$appId string
$appSecret string

autoRegisterClient() protected méthode

Automatic register process
protected autoRegisterClient ( League\OAuth2\Client\Provider\FacebookUser $facebookUser ) : WellCommerce\Bundle\ClientBundle\Entity\ClientInterface
$facebookUser League\OAuth2\Client\Provider\FacebookUser
Résultat WellCommerce\Bundle\ClientBundle\Entity\ClientInterface

checkCredentials() public méthode

public checkCredentials ( $credentials, Symfony\Component\Security\Core\User\UserInterface $user )
$user Symfony\Component\Security\Core\User\UserInterface

createAuthenticatedToken() public méthode

public createAuthenticatedToken ( Symfony\Component\Security\Core\User\UserInterface $user, string $providerKey ) : UsernamePasswordToken
$user Symfony\Component\Security\Core\User\UserInterface
$providerKey string
Résultat Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken

getCredentials() public méthode

public getCredentials ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getProvider() public méthode

public getProvider ( ) : League\OAuth2\Client\Provider\Facebook
Résultat League\OAuth2\Client\Provider\Facebook

getUser() public méthode

public getUser ( $authorizationCode, Symfony\Component\Security\Core\User\UserProviderInterface $userProvider )
$userProvider Symfony\Component\Security\Core\User\UserProviderInterface

onAuthenticationFailure() public méthode

Scheme used after authentification fails
public onAuthenticationFailure ( Request $request, Symfony\Component\Security\Core\Exception\AuthenticationException $exception ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$exception Symfony\Component\Security\Core\Exception\AuthenticationException
Résultat Symfony\Component\HttpFoundation\RedirectResponse

onAuthenticationSuccess() public méthode

Scheme used after authentification succeeds
public onAuthenticationSuccess ( Request $request, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, string $providerKey ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface
$providerKey string
Résultat Symfony\Component\HttpFoundation\RedirectResponse

start() public méthode

Starts the authentication scheme.
public start ( Request $request, Symfony\Component\Security\Core\Exception\AuthenticationException $authException = null ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$authException Symfony\Component\Security\Core\Exception\AuthenticationException
Résultat Symfony\Component\HttpFoundation\RedirectResponse

supportsRememberMe() public méthode

public supportsRememberMe ( ) : boolean
Résultat boolean

Property Details

$appId protected_oe property

protected string $appId
Résultat string

$appSecret protected_oe property

protected string $appSecret
Résultat string

$clientManager protected_oe property

protected ManagerInterface,WellCommerce\Bundle\DoctrineBundle\Manager $clientManager
Résultat WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface

$facebookProvider protected_oe property

protected Facebook,League\OAuth2\Client\Provider $facebookProvider
Résultat League\OAuth2\Client\Provider\Facebook

$routerHelper protected_oe property

protected RouterHelperInterface,WellCommerce\Bundle\CoreBundle\Helper\Router $routerHelper
Résultat WellCommerce\Bundle\CoreBundle\Helper\Router\RouterHelperInterface