PHP Class Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedCookieManager

Afficher le fichier Open project: scheb/two-factor-bundle Class Usage Examples

Méthodes publiques

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

Méthodes protégées

Méthode Description
getDateTimeNow ( ) : DateTime Return current DateTime object.

Method Details

__construct() public méthode

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

Create a cookie for trusted computer.
public createTrustedCookie ( Request $request, mixed $user ) : Cookie
$request Symfony\Component\HttpFoundation\Request
$user mixed
Résultat Symfony\Component\HttpFoundation\Cookie

getDateTimeNow() protected méthode

Return current DateTime object.
protected getDateTimeNow ( ) : DateTime
Résultat DateTime

isTrustedComputer() public méthode

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
Résultat boolean