code: private URI redirectUriUsing(HttpServletRequest request) {
          URI redirect;
  
          URI redirectUri = oAuth2ServiceProperties.getRedirectUri();
          if (!redirectUri.isAbsolute()) {
              redirect = UriBuilder.fromPath(request.getContextPath())
                      .path(redirectUri.toString())
                      .scheme(request.getScheme())
                      .host(request.getServerName())
                      .port(request.getServerPort())
                      .build();
          } else {
              redirect = redirectUri;
          }
  
              return redirect;
      }
docs: Returns the absolute redirect URI, using the {@link HttpServletRequest} to generate the absolute URL
  if the configured URL is not absolute.
  @param request
  @return