PHP Interface Scheb\TwoFactorBundle\Security\TwoFactor\Provider\TwoFactorProviderInterface

Show file Open project: scheb/two-factor-bundle

Public Methods

Method Description
beginAuthentication ( Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface $context ) : boolean Return true when two-factor authentication process should be started.
requestAuthenticationCode ( Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface $context ) : Response | null Ask for two-factor authentication code.

Method Details

beginAuthentication() public method

Return true when two-factor authentication process should be started.
public beginAuthentication ( Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface $context ) : boolean
$context Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface
return boolean

requestAuthenticationCode() public method

Providers can create a response or ignore the request by returning null.
public requestAuthenticationCode ( Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface $context ) : Response | null
$context Scheb\TwoFactorBundle\Security\TwoFactor\AuthenticationContextInterface
return Symfony\Component\HttpFoundation\Response | null