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

Inheritance: implements Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Email\Generator\CodeGeneratorInterface
Afficher le fichier Open project: scheb/two-factor-bundle Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
generateCode ( integer $min, integer $max ) : integer Generate authentication code.

Method Details

__construct() public méthode

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 méthode

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 méthode

Generate authentication code.
protected generateCode ( integer $min, integer $max ) : integer
$min integer
$max integer
Résultat integer