#472 Create recovery code/expiration columns and methods in data source
This commit is contained in:
@@ -235,6 +235,24 @@ public class CacheDataSource implements DataSource {
|
||||
return source.getAllAuths();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecoveryCode(String name, String code, long expiration) {
|
||||
source.setRecoveryCode(name, code, expiration);
|
||||
cachedAuths.refresh(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecoveryCode(String name) {
|
||||
// TODO #472: can probably get it from the cached Auth?
|
||||
return source.getRecoveryCode(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeRecoveryCode(String name) {
|
||||
source.removeRecoveryCode(name);
|
||||
cachedAuths.refresh(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayerAuth> getLoggedPlayers() {
|
||||
return new ArrayList<>(PlayerCache.getInstance().getCache().values());
|
||||
|
||||
Reference in New Issue
Block a user