PHP 클래스 Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedCookieManager

파일 보기 프로젝트 열기: scheb/two-factor-bundle 1 사용 예제들

공개 메소드들

메소드 설명
__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