Package com.googlecode.batchfb.util

Examples of com.googlecode.batchfb.util.RequestBuilder


  /**
   * Actually verify the assertion (at the browserid.org website) and return the parsed results.
   */
  private static Assertion verifyOnce(String assertion, String audience) throws IOException {

    RequestBuilder request = new RequestBuilder(VERIFY_LINK, HttpMethod.POST);
    request.addParam("assertion", assertion);
    request.addParam("audience", audience);

    HttpResponse response = request.execute();
    if (response.getResponseCode() != HttpServletResponse.SC_OK)
      throw new IllegalStateException("Bad response code: " + response.getResponseCode());

    Assertion result = MAPPER.readValue(response.getContentStream(), Assertion.class);

View Full Code Here

TOP

Related Classes of com.googlecode.batchfb.util.RequestBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.