Class flAuthTOTP
flAuthTOTP Class
Class to implement TOTP (Time-based One Time Password) authentication. The codes generated are compatiable with Google Authenticator.
Package: fusionLib
Copyright: Copyright (c) 2015 fusionLib. All rights reserved.
Located at system/libs/Auth/flAuthTOTP.php
Copyright: Copyright (c) 2015 fusionLib. All rights reserved.
Located at system/libs/Auth/flAuthTOTP.php
Methods summary
public static
string
|
|
public static
string
|
|
public static
string
|
#
getCode( string $secret, integer $timeSlice = null )
Calculate the code, with given secret and point in time |
public static
boolean
|
#
verifyCode( string $secret, string $code, integer $discrepancy = 1 )
Check if the code is correct. This will accept codes starting from $discrepancy30sec ago to $discrepancy30sec from now |
protected static
string
|