code: private Token requestCredentials(URL url, Method method, Token token,
  			Map<String, String> additionalAuthParams) throws IOException {
  		Response r = requestInternal(url, method, token, additionalAuthParams, null);
  		InputStream is = r.getInputStream();
  		String response = CSLUtils.readStreamToString(is, UTF8);
  		
  		//create token for temporary credentials
  		Map<String, String> sr = splitResponse(response);
  		return responseToToken(sr);
  	}
docs: Sends a request to the server and returns a token
  @param url the URL to send the request to
  @param method the HTTP request method
  @param token a token used for authorization (may be null if the
  app is not authorized yet)
  @param additionalAuthParams additional parameters that should be
  added to the <code>Authorization</code> header
  @return the token
  @throws IOException if the request was not successful
  @throws RequestException if the server returned an error
  @throws UnauthorizedException if the request is not authorized