app/controllers/oauth/jira/authorizations_controller.rb
# 3. Rewire and adjust access_token request accordingly.
3. Rewire and adjust access_token request accordingly.
3 . Rewire and adjust access_token request accordingly .
def access_token
    auth_params = params
                    .slice(:code, :client_id, :client_secret)
                    .merge(grant_type: 'authorization_code', redirect_uri: oauth_jira_callback_url)
    auth_response = HTTParty.post(oauth_token_url, body: auth_params)
    token_type, scope, token = auth_response['token_type'], auth_response['scope'], auth_response['access_token']
    render text: "access_token=#{token}&scope=#{scope}&token_type=#{token_type}"
  end
def access_token auth_params = params . slice ( :code , :client_id , :client_secret ) . merge ( grant_type : 'authorization_code' , redirect_uri : oauth_jira_callback_url ) auth_response = HTTParty . post ( oauth_token_url , body : auth_params ) token_type , scope , token = auth_response [ 'token_type' ] , auth_response [ 'scope' ] , auth_response [ 'access_token' ] render text : "access_token=#{token}&scope=#{scope}&token_type=#{token_type}" end
3.
3 .