phpDocumentor

TwoFactorAuthReadService
in package

Class representing a two-factor-authorization read service

Table of Contents

$configurationStorage  : AuthConfigurationStorage
Configuration storage
$safetyFileStorage  : AuthSafetyFileStorage
Safety file storage
$toleratedDelay  : IntType
Tolerated time window drift
__construct()  : mixed
Create instance
randomSecret()  : AuthSecret
Return a random secret
safetyFileExistenceForCustomer()  : bool
Return whether a safety file exists for the provided customer ID
tokenForCustomer()  : AuthToken
Return the token for the provided customer ID
tokenForSecret()  : AuthToken
Return the token for the provided secret
tokenValidityForCustomer()  : bool
Return whether the provided token is valid for the provided customer ID
tokenValidityForSecret()  : bool
Return whether the provided token is valid for the provided secret
usageStatusForCustomer()  : bool
Return whether the provided customer has a secret and a safety file This method should be used to check whether the provided customer is using 2FA

Properties

Methods

safetyFileExistenceForCustomer()

Return whether a safety file exists for the provided customer ID

public safetyFileExistenceForCustomer(IdType $customerId) : bool
Parameters
$customerId : IdType

Customer ID

Return values
bool

Whether a safety file exists for the provided customer ID

tokenValidityForCustomer()

Return whether the provided token is valid for the provided customer ID

public tokenValidityForCustomer(AuthToken $token, IdType $customerId) : bool
Parameters
$token : AuthToken

Token

$customerId : IdType

Customer ID

Return values
bool

Whether the provided token is valid for the provided customer

tokenValidityForSecret()

Return whether the provided token is valid for the provided secret

public tokenValidityForSecret(AuthToken $token, AuthSecret $secret) : bool
Parameters
$token : AuthToken

Token

$secret : AuthSecret

Secret

Return values
bool

Whether the provided is valid for the provided secret

usageStatusForCustomer()

Return whether the provided customer has a secret and a safety file This method should be used to check whether the provided customer is using 2FA

public usageStatusForCustomer(IdType $customerId) : bool
Parameters
$customerId : IdType

Customer ID

Return values
bool

Whether the provided customer uses 2FA

Search results