Bunch of refactoring

- Get rid of KeyProfile and use DatabaseEntry directly
- Don't store Google auth style urls in the db, but use separate fields
- Update testdata to reflect db format changes
- Lay the ground work for HOTP support
- Refactor KeyInfo and split it into OtpInfo, TotpInto and HotpInfo
- Surely some other stuff I forgot about
This commit is contained in:
Alexander Bakker 2018-06-06 16:15:31 +02:00
parent 9859011a6d
commit 4a4ab1a82c
47 changed files with 1230 additions and 861 deletions

View file

@ -0,0 +1,24 @@
package me.impy.aegis.otp;
public class GoogleAuthInfoException extends Exception {
public GoogleAuthInfoException(Throwable cause) {
super(cause);
}
public GoogleAuthInfoException(String message) {
super(message);
}
public GoogleAuthInfoException(String message, Throwable cause) {
super(message, cause);
}
@Override
public String getMessage() {
Throwable cause = getCause();
if (cause == null) {
return super.getMessage();
}
return String.format("%s (%s)", super.getMessage(), cause.getMessage());
}
}