IsDefaultAuthenticationSettings (open)

Returns whether the specified authentication settings are the default value (no passwords set, no second factor set)

Syntax

LOADLIB "mod::wrd/lib/auth.whlib";

BOOLEAN FUNCTION IsDefaultAuthenticationSettings(RECORD value)

Parameters

RECORD value

Authentication settings

RECORD ARRAY passwords

List of passwords, last one is current valid password.

STRING passwords.passwordhash

Password hash.

DATETIME passwords.validfrom

Date from when this password hash. Must be increasing and smaller than GetCurrentDateTime().

RECORD totp

TOTP second factor settings

RECORD ARRAY totp.backupcodes

List of backup codes

STRING totp.backupcodes.code

Backup code

DATETIME totp.locked

Datime when normal code entry was locked due to too many failures

STRING totp.url

TOTP configuration url, see GetTOTPUrl

DATETIME totp.used

Date when backup code was used

INTEGER version

Settings version, should be 1.

Return value

BOOLEAN

TRUE if the settings are default