A bzBond-server microbond to generate TOTP codes.
On a FileMaker server with bzBond-server installed run the following command:
/var/www/bzbond-server/bin/install-microbond.sh bzmb-totp https://github.com/beezwax/bzmb-totp
See the bzBond-server documentation for more details on installation.
The bzmb-totp microbond provides one route
In a server-side FileMaker script run bzBondRelay
script with parameters in the following format:
{
"mode": "PERFORM_JAVASCRIPT",
"route": "bzmb-totp-generate",
"customMethod": "POST",
"customBody": {
// Required. The TOTP secret for the multifactor authentication method
"secret": "string"
// Optional. The encoding format of the secret
// Default
"encoding": "base32",
}
}
The code can be accessed via Get ( ScriptResult )
:
JSONGetElement ( Get ( ScriptResult ); "response.result" )