Full support of HOTP

This commit is contained in:
Bubka
2020-01-24 22:37:48 +01:00
parent a4a780b14f
commit 24e643ff87
5 changed files with 99 additions and 63 deletions

View File

@ -3,7 +3,7 @@
namespace App\Http\Controllers;
use App\TwoFAccount;
use App\Classes\TimedTOTP;
use App\Classes\OTP;
use Illuminate\Http\Request;
use ParagonIE\ConstantTime\Base32;
use Illuminate\Support\Facades\Storage;
@ -71,10 +71,10 @@ class TwoFAccountController extends Controller
* @param \App\TwoFAccount $twofaccount
* @return \Illuminate\Http\Response
*/
public function generateTOTP(TwoFAccount $twofaccount)
public function generateOTP(TwoFAccount $twofaccount)
{
return response()->json(TimedTOTP::get($twofaccount->uri), 200);
return response()->json(OTP::get($twofaccount->uri), 200);
}