Set authenticated device after updating last seen

This commit is contained in:
Chris Eager authored and Jon Chambers committed 2021-07-16 16:52:58 -04:00
1 parent 01ef855157
commit bd03d910fe
1 file changed
+3 -2
@@ -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();