protected GoogleAuthenticator buildGoogleAuthenticatorFrom(
        final CoreGoogleAuthenticatorMultifactorProperties gauth) {
        val builder = new GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder();
        builder.setCodeDigits(gauth.getCodeDigits());
        builder.setTimeStepSizeInMillis(TimeUnit.SECONDS.toMillis(gauth.getTimeStepSize()));
        builder.setWindowSize(gauth.getWindowSize());
        builder.setKeyRepresentation(KeyRepresentation.BASE32);
        val authenticator = new GoogleAuthenticator(builder.build());
        authenticator.setCredentialRepository(credentialRepository);
        return authenticator;
    }
This is {@link DefaultCasGoogleAuthenticator}.
A wrapper around the google authenticator instance {@link CasGoogleAuthenticator}
to allow for {@link org.springframework.cloud.context.config.annotation.RefreshScope}
on beans since original class is marked as final and cannot be refreshed
via proxies.
This uses the delegate pattern to route calls to the real instance.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-gauth-core/src/main/java/org/apereo/cas/gauth/DefaultCasGoogleAuthenticator.java