Set authenticated device after updating last seen

This commit is contained in:
Chris Eager 2021-07-07 16:40:31 -05:00 committed by Jon Chambers
parent 01ef855157
commit bd03d910fe
1 changed files with 3 additions and 2 deletions

View File

@ -82,8 +82,9 @@ public class BaseAccountAuthenticator {
if (device.get().getAuthenticationCredentials().verify(basicCredentials.getPassword())) {
succeeded = true;
account.get().setAuthenticatedDevice(device.get());
return Optional.of(updateLastSeen(account.get(), device.get()));
final Account authenticatedAccount = updateLastSeen(account.get(), device.get());
authenticatedAccount.setAuthenticatedDevice(device.get());
return Optional.of(authenticatedAccount);
}
return Optional.empty();