I'm developing an integration of some external system (NetSuite) with our Jira Instance, and I am trying to trigger a call to an already developed and working Restlet (verified auth and access via Postman) by running an script in the Console in ScriptRunner.
While having some trouble finding the way to sign the get request having all the access secret/token and consumer secret/token, I ended up finding the right way:
def client = new RESTClient(hostUrl)
client.auth.oauth(consumerKey, consumerSecret, accessToken, tokenSecret)
I checked by running this approach as independent groovy script in intellij and it correctly compiles and send the request (although I need to handle how to configure it to use HMAC-SHA256 instead of HMAC-SHA1, but that's another story)
But when I run the code in the ScriptRunner console it complains with oauth exception
Something went wrong: NoClassDefFoundError
oauth/signpost/OAuthConsumer
So is the Oauth signing of requests not supported? Is there anything extra I need to do to be able to make it happen?
Thanks
PS: Any way to add the Realm parameter to the Oauth auth header?