|
|
|
|
|
by lud_lite
426 days ago
|
|
Booleans also force the true/false framing. E.g. a field called userCannotLoginWithoutOTP. Then in code "if not userCannotLoginWithoutOTP or otpPresent then..." Thus may seem easy until you have a few flags to combine and check. An enum called LoginRequirements with values Password, PasswordAndOTP is one less negation and easier to read. |
|