Authentication adapters for common use cases.

dev-develop 2022-09-12 15:31 UTC

This package is auto-updated.

Last update: 2024-05-17 15:23:25 UTC


README

$Id$ ($Date$)

Stuff to help with or add to authentication.

Two Factor Authentication

Generating and verifying tokens and pins.

Generate Token

$token = new \Inane\Authentication\TwoFactor\Token('Inane');
echo "$token";

Verify OTP

$otp = new \Inane\Authentication\TwoFactor\OneTimePin($token);
$valid = $otp->verifyOTP('612777');

QRCode URL

$imgUrl = $token->getQRCodeUrl();
// OR
$imgBase64 = $token->getImageBase64();