noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
otp-link.php File Reference

generate a QRCode for setting up freeOTP More...

Go to the source code of this file.

Variables

 $authenticator = new \Noalyss\OTP()
 
 $data = $authenticator->get_authenticator()->getUri(label:"noalyss:".$user->getEmail(),issuer:"noalyss.eu")
 
 $http = new HttpInput()
 
 $id
 
if($repository->count()==0) $otp_send = new Otp_Send_Secret_SQL($repository, $id)
 
 $qrCode
 
 $repository = new \Database(0)
 
 $result = $writer->write($qrCode)
 
 $secret = $user->get_otp_secret()
 
 $user = new Noalyss_User($repository, $otp_send->get('use_id'))
 
 $writer = new PngWriter()
 
 _ ("Scanner ceci avec votre application OTP")
 
 if (!file_exists( $dirname . '/config.inc.php'))
 
 try
 

Detailed Description

generate a QRCode for setting up freeOTP

Definition in file otp-link.php.

Variable Documentation

◆ $authenticator

$authenticator = new \Noalyss\OTP()

Definition at line 163 of file otp-link.php.

Referenced by Noalyss\OTP\get_authenticator().

◆ $data

$data = $authenticator->get_authenticator()->getUri(label:"noalyss:".$user->getEmail(),issuer:"noalyss.eu")

Definition at line 165 of file otp-link.php.

◆ $http

$http = new HttpInput()

Definition at line 140 of file otp-link.php.

◆ $id

$id
Initial value:
= $repository->get_value("select os_id from otp_send_secret where os_request=$1",
[$uuid])

Definition at line 148 of file otp-link.php.

◆ $otp_send

if ( $repository->count()==0) $otp_send = new Otp_Send_Secret_SQL($repository, $id)

Definition at line 157 of file otp-link.php.

◆ $qrCode

$qrCode
Initial value:
= new QrCode(
data: $data,
encoding: new Encoding('UTF-8'),
errorCorrectionLevel: ErrorCorrectionLevel::Medium,
size: 600,
margin: 10,
roundBlockSizeMode: RoundBlockSizeMode::Margin,
foregroundColor: new Color(0, 0, 0),
backgroundColor: new Color(255, 255, 255)
)
$name size

Definition at line 171 of file otp-link.php.

◆ $repository

$repository = new \Database(0)

Definition at line 143 of file otp-link.php.

◆ $result

$result = $writer->write($qrCode)

Definition at line 182 of file otp-link.php.

◆ $secret

$secret = $user->get_otp_secret()

Definition at line 159 of file otp-link.php.

Referenced by Noalyss\OTP\build_secret(), and Noalyss\OTP\compute_code().

◆ $user

$user = new Noalyss_User($repository, $otp_send->get('use_id'))

Definition at line 158 of file otp-link.php.

Referenced by Noalyss\Mobile\display_menu(), and Noalyss_User\grant_admin_access().

◆ $writer

$writer = new PngWriter()

Definition at line 168 of file otp-link.php.

◆ _

_("Scanner ceci avec votre application OTP") ( "Scanner ceci avec votre application OTP" )

Definition at line 185 of file otp-link.php.

◆ if

if(DEBUGNOALYSS > 1) ( ! file_exists $dirname . '/config.inc.php')

Definition at line 29 of file otp-link.php.

◆ try

try
Initial value:
{
$uuid = $http->get('otp')

Definition at line 141 of file otp-link.php.