ESET Secure Authentication SDK documentation
 All Classes Namespaces Functions Variables
Public Member Functions | Protected Attributes | List of all members
ESET\SecureAuthentication\SDK\TwoFactorAuthenticator Class Reference
Inheritance diagram for ESET\SecureAuthentication\SDK\TwoFactorAuthenticator:
ESET\SecureAuthentication\SDK\ITwoFactorAuthenticator

Public Member Functions

 __construct ($configuration)
 
 getUser ($username)
 
 createUser ($username, $mobileNumber)
 
 preAuthenticate ($username)
 
 authenticate ($username, $otp)
 

Protected Attributes

 $internalAuthenticator
 
 $userStorage
 
 $auditor
 

Constructor & Destructor Documentation

ESET\SecureAuthentication\SDK\TwoFactorAuthenticator::__construct (   $configuration)

Create a new TwoFactorAuthenticator object

Parameters
TwoFactorConfiguration$configuration

Member Function Documentation

ESET\SecureAuthentication\SDK\TwoFactorAuthenticator::authenticate (   $username,
  $otp 
)

Authenticate a user

Parameters
string$usernameUsername
string$otpOTP
Returns
AuthenticateResult Information about the authentication attempt

Implements ESET\SecureAuthentication\SDK\ITwoFactorAuthenticator.

ESET\SecureAuthentication\SDK\TwoFactorAuthenticator::createUser (   $username,
  $mobileNumber 
)

Create a new two-factor user account

Parameters
string$usernameUsername
string$mobileNumberUser's mobile number
Returns
TwoFactorUser

Implements ESET\SecureAuthentication\SDK\ITwoFactorAuthenticator.

ESET\SecureAuthentication\SDK\TwoFactorAuthenticator::getUser (   $username)

Retrieve a two-factor user account

Parameters
string$usernameUsername
Returns
TwoFactorUser

Implements ESET\SecureAuthentication\SDK\ITwoFactorAuthenticator.

ESET\SecureAuthentication\SDK\TwoFactorAuthenticator::preAuthenticate (   $username)

Prepare a user for authentication

All necessary preparations are made for user authentication. For instance, if a user is enabled for text message OTPs, a new OTP will be generated and sent to the user.

Parameters
string$usernameUsername
Returns
PreAuthenticateResult Information about the expected authentication

Implements ESET\SecureAuthentication\SDK\ITwoFactorAuthenticator.