@Override
    public Optional<RedirectionAction> getRedirectionAction(final CallContext ctx) {
        val webContext = ctx.webContext();

        val configContext = new OidcConfigurationContext(webContext, client.getConfiguration());
        val params = buildParams(webContext);

        val computedCallbackUrl = client.computeFinalCallbackUrl(webContext);
        params.put(OidcConfiguration.REDIRECT_URI, computedCallbackUrl);

        addStateAndNonceParameters(ctx, params);

        var maxAge = configContext.getMaxAge();
        if (maxAge != null) {
            params.put(OidcConfiguration.MAX_AGE, maxAge.toString());
        }
        if (configContext.isForceAuthn()) {
            params.put(OidcConfiguration.PROMPT, "login");
            params.put(OidcConfiguration.MAX_AGE, "0");
        }
        if (configContext.isPassive()) {
            params.put(OidcConfiguration.PROMPT, "none");
        }

        val location = buildAuthenticationRequestUrl(params);
        LOGGER.debug("Authentication request url: {}", location);

        return Optional.of(HttpActionHelper.buildRedirectUrlAction(webContext, location));
    }
<p>Constructor for OidcRedirectionActionBuilder.</p>

@param client a {@link OidcClient} object
pac4j-oidc/src/main/java/org/pac4j/oidc/redirect/OidcRedirectionActionBuilder.java