Package oauth.signpost.jetty

Examples of oauth.signpost.jetty.JettyOAuthConsumer


    }
  }

  public ContentExchange stream(ContentExchange ex, Symbol... symbols) throws ModelException
  {
    OAuthConsumer consumer = new JettyOAuthConsumer(ForemanConstants.API_KEY.toString(), ForemanConstants.API_SECRET.toString());
    consumer.setTokenWithSecret(ForemanConstants.ACCESS_TOKEN.toString(), ForemanConstants.ACCESS_TOKEN_SECRET.toString());

    ex.setMethod(Verb.GET.name());
    ex.setURL(APICall.getStreamingQuote(ResponseFormat.XML) + getParameters(symbols));

    // sign the request
    try
    {
      consumer.sign(ex);
      client.send(ex);
    }
    catch (IOException | OAuthMessageSignerException | OAuthExpectationFailedException | OAuthCommunicationException e)
    {
      throw new ModelException("Sent Exchange to Client", e);
View Full Code Here

TOP

Related Classes of oauth.signpost.jetty.JettyOAuthConsumer

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.