@Override
    protected ModelAndView buildCallbackUrlResponseType(final AccessTokenRequestContext tokenRequestContext,
                                                        final Ticket givenAccessToken, final Ticket givenRefreshToken,
                                                        final List<NameValuePair> parameters) throws Throwable {
        val accessToken = resolveAccessToken(givenAccessToken);

        val idTokenContext = IdTokenGenerationContext.builder()
            .accessToken(accessToken)
            .userProfile(tokenRequestContext.getUserProfile())
            .responseType(OAuth20ResponseTypes.IDTOKEN_TOKEN)
            .grantType(tokenRequestContext.getGrantType())
            .registeredService(tokenRequestContext.getRegisteredService())
            .build();
        val idToken = configurationContext.getIdTokenGeneratorService().generate(idTokenContext);
        if (idToken != null) {
            LOGGER.debug("Generated ID token [{}]", idToken);
            parameters.add(new BasicNameValuePair(OidcConstants.ID_TOKEN, idToken.token()));
        }
        return super.buildCallbackUrlResponseType(tokenRequestContext, accessToken, givenRefreshToken, parameters);
    }
This is {@link OidcImplicitIdTokenAndTokenAuthorizationResponseBuilder}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/web/OidcImplicitIdTokenAndTokenAuthorizationResponseBuilder.java