class GaeUserServiceClient extends IndirectClient {

    private static final ProfileDefinition PROFILE_DEFINITION
        = new CommonProfileDefinition(x -> new GaeUserServiceProfile());

    protected UserService service;
    protected String authDomain = null;

    /** {@inheritDoc} */
    @Override
    protected void internalInit(final boolean forceReinit) {<FILL_FUNCTION_BODY>}

    /**
     * Set the authDomain for connect to google apps for domain with the UserService
     *
     * @param authDomain the authentication domain
     */
    public void setAuthDomain(final String authDomain) {
        this.authDomain = authDomain;
    }

    /**
     * <p>Getter for the field <code>authDomain</code>.</p>
     *
     * @return a {@link String} object
     */
    public String getAuthDomain() {
        return authDomain;
    }
}

        service = UserServiceFactory.getUserService();
        CommonHelper.assertNotNull("service", this.service);
        setRedirectionActionBuilderIfUndefined(ctx -> {
            val webContext = ctx.webContext();
            val destinationUrl = computeFinalCallbackUrl(webContext);
            val loginUrl = authDomain == null ?  service.createLoginURL(destinationUrl)
                : service.createLoginURL(destinationUrl, authDomain);
            return Optional.of(HttpActionHelper.buildRedirectUrlAction(webContext, loginUrl));
        });
        setCredentialsExtractorIfUndefined(ctx -> {
            val credentials = new GaeUserCredentials();
            credentials.setUser(service.getCurrentUser());
            return Optional.of(credentials);
        });
        setAuthenticatorIfUndefined((ctx, credentials) -> {
            val user = ((GaeUserCredentials) credentials).getUser();
            if (user != null) {
                UserProfile profile = (GaeUserServiceProfile) PROFILE_DEFINITION.newProfile();
                profile.setId(user.getEmail());
                PROFILE_DEFINITION.convertAndAdd(profile, PROFILE_ATTRIBUTE, CommonProfileDefinition.EMAIL, user.getEmail());
                PROFILE_DEFINITION.convertAndAdd(profile, PROFILE_ATTRIBUTE, CommonProfileDefinition.DISPLAY_NAME, user.getNickname());
                if (service.isUserAdmin()) {
                    profile.addRole(GaeUserServiceProfile.PAC4J_GAE_GLOBAL_ADMIN_ROLE);
                }
                credentials.setUserProfile(profile);
            }
            return Optional.of(credentials);
        });
    
<methods>public non-sealed void <init>() ,public java.lang.String computeFinalCallbackUrl(org.pac4j.core.context.WebContext) ,public java.lang.String getCodeVerifierSessionAttributeName() ,public final Optional<org.pac4j.core.exception.http.RedirectionAction> getLogoutAction(CallContext, org.pac4j.core.profile.UserProfile, java.lang.String) ,public java.lang.String getNonceSessionAttributeName() ,public final Optional<org.pac4j.core.exception.http.RedirectionAction> getRedirectionAction(CallContext) ,public java.lang.String getStateSessionAttributeName() ,public org.pac4j.core.exception.http.HttpAction processLogout(CallContext, org.pac4j.core.credentials.Credentials) <variables>public static final java.lang.String ATTEMPTED_AUTHENTICATION_SUFFIX,private static final java.lang.String CODE_VERIFIER_SESSION_PARAMETER,private static final java.lang.String NONCE_SESSION_PARAMETER,private static final java.lang.String STATE_SESSION_PARAMETER,private org.pac4j.core.http.ajax.AjaxRequestResolver ajaxRequestResolver,protected java.lang.String callbackUrl,protected org.pac4j.core.http.callback.CallbackUrlResolver callbackUrlResolver,private boolean checkAuthenticationAttempt,private org.pac4j.core.logout.LogoutActionBuilder logoutActionBuilder,private org.pac4j.core.logout.processor.LogoutProcessor logoutProcessor,private org.pac4j.core.redirect.RedirectionActionBuilder redirectionActionBuilder,protected org.pac4j.core.http.url.UrlResolver urlResolver