docs: protected ModelAndView buildCallbackUrlResponseType(final AccessTokenRequestDataHolder holder,
                                                          final String redirectUri,
                                                          final AccessToken accessToken,
                                                          final List<NameValuePair> params,
                                                          final RefreshToken refreshToken,
                                                          final J2EContext context) throws Exception {
          val attributes = holder.getAuthentication().getAttributes();
          val state = attributes.get(OAuth20Constants.STATE).get(0).toString();
          val nonce = attributes.get(OAuth20Constants.NONCE).get(0).toString();
  
          val builder = new URIBuilder(redirectUri);
          val stringBuilder = new StringBuilder();
  
          val timeToLive = accessTokenExpirationPolicy.getTimeToLive();
          stringBuilder.append(OAuth20Constants.ACCESS_TOKEN)
              .append('=')
              .append(accessToken.getId())
              .append('&')
              .append(OAuth20Constants.TOKEN_TYPE)
              .append('=')
              .append(OAuth20Constants.TOKEN_TYPE_BEARER)
              .append('&')
              .append(OAuth20Constants.EXPIRES_IN)
              .append('=')
              .append(timeToLive);
  
          if (refreshToken != null) {
              stringBuilder.append('&')
                  .append(OAuth20Constants.REFRESH_TOKEN)
                  .append('=')
                  .append(refreshToken.getId());
          }
  
          params.forEach(p -> stringBuilder.append('&')
              .append(p.getName())
              .append('=')
              .append(p.getValue()));
  
          if (StringUtils.isNotBlank(state)) {
              stringBuilder.append('&')
                  .append(OAuth20Constants.STATE)
                  .append('=')
                  .append(EncodingUtils.urlEncode(state));
          }
          if (StringUtils.isNotBlank(nonce)) {
              stringBuilder.append('&')
                  .append(OAuth20Constants.NONCE)
                  .append('=')
                  .append(EncodingUtils.urlEncode(nonce));
          }
          builder.setFragment(stringBuilder.toString());
          val url = builder.toString();
  
          LOGGER.debug("Redirecting to URL [{}]", url);
          val parameters = new LinkedHashMap<String, String>();
          parameters.put(OAuth20Constants.ACCESS_TOKEN, accessToken.getId());
          if (refreshToken != null) {
              parameters.put(OAuth20Constants.REFRESH_TOKEN, refreshToken.getId());
          }
          parameters.put(OAuth20Constants.EXPIRES_IN, timeToLive.toString());
          parameters.put(OAuth20Constants.STATE, state);
          parameters.put(OAuth20Constants.NONCE, nonce);
          parameters.put(OAuth20Constants.CLIENT_ID, accessToken.getClientId());
          return buildResponseModelAndView(context, servicesManager, accessToken.getClientId(), url, parameters);
      }