@Override
    public OneTimeTokenAccount save(final OneTimeTokenAccount account) {
        account.assignIdIfNecessary();
        return lock.tryLock(() -> {
            val encoded = encode(account);
            val records = accounts.getOrDefault(account.getUsername().trim().toLowerCase(Locale.ENGLISH), new ArrayList<>());
            records.add(encoded);
            accounts.put(account.getUsername(), records);
            return encoded;
        });
    }
This is {@link InMemoryGoogleAuthenticatorTokenCredentialRepository}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-gauth-core/src/main/java/org/apereo/cas/gauth/credential/InMemoryGoogleAuthenticatorTokenCredentialRepository.java