code: public String getEndUserAuthorizationRequestUri(final HttpServletRequest request) {
  
  		OAuthClientRequest oauthClientRequest;
  
  		try {
  
  			oauthClientRequest = OAuthClientRequest
  				.authorizationLocation(authorizationLocation)
  				.setClientId(clientId)
  				.setRedirectURI(getAbsoluteUrl(request, redirectUri))
  				.setScope(getScope())
  				.setResponseType(getResponseType())
  				.setState(getState())
  				.buildQueryMessage();
  
  			logger.info("Authorization request location URI: {}", oauthClientRequest.getLocationUri());
  
  			return oauthClientRequest.getLocationUri();
  
  		} catch (OAuthSystemException ex) {
  			logger.error("", ex);
  		}
  
  		return null;
  
  	}
docs: Create an end-user authorization request
  
  Use with {@literal response.setRedirect(request.getLocationUri());}
  
  @param request
  @return request URI