#1141 Make 2fa messages translatable, various cleanups (null safety, ...)

This commit is contained in:
ljacqu
2018-03-21 23:56:13 +01:00
parent 584a0bebbf
commit e9ab82db6b
10 changed files with 78 additions and 28 deletions
@@ -30,6 +30,13 @@ public class TotpAuthenticator {
this.bukkitService = bukkitService;
}
/**
* Returns whether the given input code matches for the provided TOTP key.
*
* @param totpKey the key to check with
* @param inputCode the input code to verify
* @return true if code is valid, false otherwise
*/
public boolean checkCode(String totpKey, String inputCode) {
try {
Integer totpCode = Integer.valueOf(inputCode);