code: public URI getAuthFlowStartEndpoint(final String returnTo, final String scope)
  	{
  		final String oauthServiceRoot = (oauthServiceRedirectEndpoint != null) ?
  		                                oauthServiceRedirectEndpoint :
  		                                oauthServiceEndpoint;
  		final String endpoint = oauthServiceRoot + "/oauth2/authorize";
  
  		UriBuilder builder = UriBuilder.fromUri(endpoint);
  
  		builder.replaceQueryParam("response_type", "code");
  		builder.replaceQueryParam("client_id", clientId);
  		builder.replaceQueryParam("redirect_uri", getOwnCallbackUri());
  		if (scope != null)
  			builder.replaceQueryParam("scope", scope);
  
  		if (returnTo != null)
  			builder.replaceQueryParam("state", encodeState(callbackNonce + " " + returnTo));
  
  		return builder.build();
  	}
docs: Get the endpoint to redirect a client to in order to start an OAuth2 Authorisation Flow
  
  @param returnTo
  The URI to redirect the user back to once the authorisation flow completes successfully. If not specified then the user
  will be directed to the root of this webapp.
  
  @return