PHP Class CakeDC\Users\Controller\Component\GoogleAuthenticatorComponent

Inheritance: extends Cake\Controller\Component
Show file Open project: CakeDC/users

Public Properties

Property Type Description
$tfa RobThree\Auth\TwoFactorAuth

Public Methods

Method Description
createSecret ( ) : base32 createSecret
getQRCodeImageAsDataUri ( $issuer, $secret ) : string getQRCodeImageAsDataUri
initialize ( array $config ) : void initialize method
verifyCode ( string $secret, string $code ) : boolean verifyCode Verifying tfa code with shared secret

Method Details

createSecret() public method

createSecret
public createSecret ( ) : base32
return base32 shared secret stored in users table

getQRCodeImageAsDataUri() public method

getQRCodeImageAsDataUri
public getQRCodeImageAsDataUri ( $issuer, $secret ) : string
return string base64 string containing QR code for shared secret

initialize() public method

initialize method
public initialize ( array $config ) : void
$config array The config data
return void

verifyCode() public method

verifyCode Verifying tfa code with shared secret
public verifyCode ( string $secret, string $code ) : boolean
$secret string of the user
$code string from verification form
return boolean

Property Details

$tfa public property

public TwoFactorAuth,RobThree\Auth $tfa
return RobThree\Auth\TwoFactorAuth