#1141 Add TOTP key field to database and PlayerAuth

- Add new field for storing TOTP key
- Implement data source methods for manipulation of its value
This commit is contained in:
ljacqu
2018-03-05 19:50:58 +01:00
parent 930f5609bf
commit 9954c82cb6
10 changed files with 126 additions and 2 deletions
@@ -268,6 +268,15 @@ public class CacheDataSource implements DataSource {
return source.getRecentlyLoggedInPlayers();
}
@Override
public boolean setTotpKey(String user, String totpKey) {
boolean result = source.setTotpKey(user, totpKey);
if (result) {
cachedAuths.refresh(user);
}
return result;
}
@Override
public void invalidateCache(String playerName) {
cachedAuths.invalidate(playerName);