PHP Класс Scheb\TwoFactorBundle\Security\TwoFactor\Session\SessionFlagManager

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

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

Свойство Тип Описание
$flagGenerator Scheb\TwoFactorBundle\Security\TwoFactor\Session\SessionFlagGenerator
$session Symfony\Component\HttpFoundation\Session\SessionInterface

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

Метод Описание
__construct ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Scheb\TwoFactorBundle\Security\TwoFactor\Session\SessionFlagGenerator $flagGenerator ) Construct a manager that takes care of session flags.
isNotAuthenticated ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : boolean Check if session flag is set and is not complete.
setBegin ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) Set session flag to ask for two-factor authentication.
setComplete ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) Set session flag completed.

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

Метод Описание
getSessionFlag ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : string Generate session token.

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

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

Construct a manager that takes care of session flags.
public __construct ( Symfony\Component\HttpFoundation\Session\SessionInterface $session, Scheb\TwoFactorBundle\Security\TwoFactor\Session\SessionFlagGenerator $flagGenerator )
$session Symfony\Component\HttpFoundation\Session\SessionInterface
$flagGenerator Scheb\TwoFactorBundle\Security\TwoFactor\Session\SessionFlagGenerator

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

Generate session token.
protected getSessionFlag ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : string
$provider string Two-factor provider name
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Результат string

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

Check if session flag is set and is not complete.
public isNotAuthenticated ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : boolean
$provider string
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface
Результат boolean

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

Set session flag to ask for two-factor authentication.
public setBegin ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )
$provider string
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface

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

Set session flag completed.
public setComplete ( string $provider, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token )
$provider string
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface

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

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

protected SessionFlagGenerator,Scheb\TwoFactorBundle\Security\TwoFactor\Session $flagGenerator
Результат Scheb\TwoFactorBundle\Security\TwoFactor\Session\SessionFlagGenerator

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

protected SessionInterface,Symfony\Component\HttpFoundation\Session $session
Результат Symfony\Component\HttpFoundation\Session\SessionInterface