[groovy-user] wslite:oauth authentication

100 views
Skip to first unread message

Vinay Samudre

unread,
Nov 27, 2012, 7:46:14 PM11/27/12
to us...@groovy.codehaus.org
Hi All,

I am getting  'wslite.rest.RESTClientException: 401 Unauthorized' when I run following script....

def client = new RESTClient('https://xxxxxxx')
def response = client.get(
         path: '/people',
         sslTrustAllCerts: true ,
         headers: [
                     oauth_version:"1.0",
                     oauth_signature_method: "HMAC-SHA1",
                     oauth_nonce: "xxxx",
                     oauth_timestamp: "1353991837",
                     oauth_consumer_key: "XXXXX",
                     oauth_signature: "xxxxxxxxxxxxxxxxxxxxx"
                  ]
         )

I copied oauth_* header values from the restclient debugger plugin for firefox.
Please let me know is oAuth supported by wslite or not. Server is doing two leged oauth authentication.

Thanks,
Vinay

jwagenleitner

unread,
Nov 30, 2012, 7:29:01 PM11/30/12
to us...@groovy.codehaus.org
Vinay Samudre wrote
There is no built in support for oauth in wslite. In order to use oauth
with wslite you'd have to make the requests and parse the response and do
your own signing, which is quite a task. I would recommend taking a look at
HTTPBuilder (https://github.com/jgritman/httpbuilder) which I believe has
oauth support or Scribe (https://github.com/fernandezpablo85/scribe-java)
which is an oauth library for java.

John



--
View this message in context: http://groovy.329449.n5.nabble.com/wslite-oauth-authentication-tp5712000p5712036.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Reply all
Reply to author
Forward
0 new messages