PHP Класс Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticator

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

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

Метод Описание
__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