PHP Класс Elcodi\Admin\UserBundle\Security\OneTimeLoginAuthenticator

Наследование: implements Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface
Показать файл Открыть проект

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

Метод Описание
__construct ( Doctrine\Common\Persistence\ObjectManager $adminUserObjectManager, Elcodi\Component\User\Repository\AdminUserRepository $adminUserRepository ) Generates a new OneTimeLoginAuthenticator injecting it's dependencies.
authenticateToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, Symfony\Component\Security\Core\User\UserProviderInterface $userProvider, string $providerKey ) : PreAuthenticatedToken Authenticate the received token and returns an authenticated token.
createToken ( Request $request, string $providerKey ) : PreAuthenticatedToken Creates a token with the login key received on the query parameter.
supportsToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, string $providerKey ) : boolean Checks if the received token is a pre authenticated token.

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

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

Generates a new OneTimeLoginAuthenticator injecting it's dependencies.
public __construct ( Doctrine\Common\Persistence\ObjectManager $adminUserObjectManager, Elcodi\Component\User\Repository\AdminUserRepository $adminUserRepository )
$adminUserObjectManager Doctrine\Common\Persistence\ObjectManager The admin user manager object.
$adminUserRepository Elcodi\Component\User\Repository\AdminUserRepository The Admin user repository object.

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

Authenticate the received token and returns an authenticated token.
public authenticateToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, Symfony\Component\Security\Core\User\UserProviderInterface $userProvider, string $providerKey ) : PreAuthenticatedToken
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface The token generated with the login key.
$userProvider Symfony\Component\Security\Core\User\UserProviderInterface A user provider.
$providerKey string The security providerKey (The firewall security area)
Результат Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken A pre-authenticated token generated using the user admin entity.

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

Creates a token with the login key received on the query parameter.
public createToken ( Request $request, string $providerKey ) : PreAuthenticatedToken
$request Symfony\Component\HttpFoundation\Request The current request.
$providerKey string The security providerKey (The firewall security area)
Результат Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken A pre-authenticated token with the login key received.

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

Checks if the received token is a pre authenticated token.
public supportsToken ( Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token, string $providerKey ) : boolean
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface The token received.
$providerKey string The security providerKey (The firewall security area)
Результат boolean Returns true if the received token is of the expected type and for the provider key we are using.