Index

(misc)

o2app_otp

string o2app_otp(string $user, integer $otp_len)

Generates a One Time Password for application user.
OTP is a time-based access code provided to user to override his standard password
and can be used only once.
Returned OTP is a string of $otp_len chars, default length is 6.
If $user is blank then OTP is generated for the currently logged user.

OTP string can be used to access to the application by a request like this:

/app_name.php?user=otp_user&jxotp=otp_code


Parameters:
  1. $user
  2. User to generate the OTP for
  3. $otp_len
  4. Length of the OTP token