PHP 클래스 Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticator

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

공개 메소드들

메소드 설명
__construct ( Google\Authenticator\GoogleAuthenticator $authenticator, string $server, string $issuer ) Construct the helper service for Google Authenticator.
checkCode ( Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface $user, string $code ) : boolean Validates the code, which was entered by the user.
generateSecret ( ) : string Generate a new secret for Google Authenticator.
getQRContent ( Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface $user ) : string Generate the content for a QR-Code to be scanned by Google Authenticator Use this method if you don't want to use google charts to display the qr-code
getUrl ( Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface $user ) : string Generate the URL of a QR code, which can be scanned by Google Authenticator app.

메소드 상세

__construct() 공개 메소드

Construct the helper service for Google Authenticator.
public __construct ( Google\Authenticator\GoogleAuthenticator $authenticator, string $server, string $issuer )
$authenticator Google\Authenticator\GoogleAuthenticator
$server string
$issuer string

checkCode() 공개 메소드

Validates the code, which was entered by the user.
public checkCode ( Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface $user, string $code ) : boolean
$user Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface
$code string
리턴 boolean

generateSecret() 공개 메소드

Generate a new secret for Google Authenticator.
public generateSecret ( ) : string
리턴 string

getQRContent() 공개 메소드

Generate the content for a QR-Code to be scanned by Google Authenticator Use this method if you don't want to use google charts to display the qr-code
public getQRContent ( Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface $user ) : string
$user Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface
리턴 string

getUrl() 공개 메소드

Generate the URL of a QR code, which can be scanned by Google Authenticator app.
public getUrl ( Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface $user ) : string
$user Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface
리턴 string