PHP Класс Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedCookieManager

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

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

Метод Описание
__construct ( Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedTokenGenerator $tokenGenerator, Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedComputerManagerInterface $trustedComputerManager, string $cookieName, integer $cookieLifetime, boolean $cookieSecure ) Construct a manager for the trusted cookie.
createTrustedCookie ( Request $request, mixed $user ) : Cookie Create a cookie for trusted computer.
isTrustedComputer ( Request $request, mixed $user ) : boolean Check if request has trusted cookie and if it's valid.

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

Метод Описание
getDateTimeNow ( ) : DateTime Return current DateTime object.

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

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

Construct a manager for the trusted cookie.
public __construct ( Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedTokenGenerator $tokenGenerator, Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedComputerManagerInterface $trustedComputerManager, string $cookieName, integer $cookieLifetime, boolean $cookieSecure )
$tokenGenerator Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedTokenGenerator
$trustedComputerManager Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedComputerManagerInterface
$cookieName string
$cookieLifetime integer
$cookieSecure boolean

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

Create a cookie for trusted computer.
public createTrustedCookie ( Request $request, mixed $user ) : Cookie
$request Symfony\Component\HttpFoundation\Request
$user mixed
Результат Symfony\Component\HttpFoundation\Cookie

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

Return current DateTime object.
protected getDateTimeNow ( ) : DateTime
Результат DateTime

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

Check if request has trusted cookie and if it's valid.
public isTrustedComputer ( Request $request, mixed $user ) : boolean
$request Symfony\Component\HttpFoundation\Request
$user mixed
Результат boolean