PHP Class Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Email\Generator\CodeGenerator

Inheritance: implements Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Email\Generator\CodeGeneratorInterface
ファイルを表示 Open project: scheb/two-factor-bundle Class Usage Examples

Public Methods

Method Description
__construct ( Scheb\TwoFactorBundle\Model\PersisterInterface $persister, Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface $mailer, integer $digits ) Construct the code generator service.
generateAndSend ( Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface $user ) Generate a new authentication code an send it to the user.

Protected Methods

Method Description
generateCode ( integer $min, integer $max ) : integer Generate authentication code.

Method Details

__construct() public method

Construct the code generator service.
public __construct ( Scheb\TwoFactorBundle\Model\PersisterInterface $persister, Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface $mailer, integer $digits )
$persister Scheb\TwoFactorBundle\Model\PersisterInterface
$mailer Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface
$digits integer

generateAndSend() public method

Generate a new authentication code an send it to the user.
public generateAndSend ( Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface $user )
$user Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface

generateCode() protected method

Generate authentication code.
protected generateCode ( integer $min, integer $max ) : integer
$min integer
$max integer
return integer