How does implement 2-legged OAuth with Jira by jra-ruby gem?

I’m trying do it as follow

options = {
  private_key_file: 'rsakey.pem',
  consumer_key: 'my_consumer_key',
  site: 'http://localhost:2990'
@jira_client =
@jira_client.set_access_token(nil, nil)

but I get

JIRA::HTTPError: Unauthorized

In Jira Application Links I set

Allow 2-Legged OAuth: true
Execute as: MY_USER

3-Legged oauth work fine.

Source: ruby

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.