This simple plugin can be used to add a second factor for authentication (SMS, OTP,…). It uses external commands to send and validate the second factor. You can use any language to call your 2nd factor system.
Commands received arguments on the command line and must return a 0 code if succeed, another else. Nothing must be written to STDOUT, STDERR is reported in logs (but may be lost with FastCGI server).
All parameters are configured in “General Parameters » Portal Parameters » Extensions » External 2nd Factor”.
/usr/local/bin/sendOtp –uid $uid
/usr/local/bin/verify –uid $uid –code $code