I am making a simple application in Ruby and Sinatra. I want to authenticate the user in Atlassian/JIRA. The workflow would go like this: