@Override
    public Collection<? extends OneTimeTokenAccount> get(final String username) {
        return lock.tryLock(() -> {
            try {
                if (!location.getFile().exists()) {
                    LOGGER.warn("JSON account repository file [{}] is not found.", location.getFile());
                    return new ArrayList<>();
                }

                if (location.getFile().length() <= 0) {
                    LOGGER.debug("JSON account repository file location [{}] is empty.", location.getFile());
                    return new ArrayList<>();
                }
                val map = serializer.from(location.getFile());
                if (map == null) {
                    LOGGER.debug("JSON account repository file [{}] is empty.", location.getFile());
                    return new ArrayList<>();
                }

                val account = map.get(username.trim().toLowerCase(Locale.ENGLISH));
                if (account != null) {
                    return decode(account);
                }
            } catch (final Exception e) {
                LoggingUtils.error(LOGGER, e);
            }
            return new ArrayList<>();
        });
    }
This is {@link JsonGoogleAuthenticatorTokenCredentialRepository}.

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