]> git.openstreetmap.org Git - rails.git/commitdiff
Display the verifier if OAuth 1.0a is being used in OOB mode
authorTom Hughes <tom@compton.nu>
Mon, 20 Sep 2010 20:44:54 +0000 (21:44 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 21 Sep 2010 15:20:30 +0000 (16:20 +0100)
app/controllers/oauth_controller.rb
app/views/oauth/authorize_success.html.erb

index 260f9ecfe5d659e69a13091d68f88611ddb4d52f..f70a644cdb4146f69cdb98fa2ed46e80ad620b8f 100644 (file)
@@ -57,7 +57,7 @@ class OauthController < ApplicationController
           else
             redirect_url = @token.oob? ? @token.client_application.callback_url : @token.callback_url
           end
           else
             redirect_url = @token.oob? ? @token.client_application.callback_url : @token.callback_url
           end
-          if redirect_url
+          if redirect_url and not redirect_url.empty?
             if @token.oauth10?
               redirect_to "#{redirect_url}?oauth_token=#{@token.token}"
             else
             if @token.oauth10?
               redirect_to "#{redirect_url}?oauth_token=#{@token.token}"
             else
index effe24a796716c71469a56802de7b2b60752099a..a25b98ec782fda42c7f9f3ee0ecd11b656c7c670 100644 (file)
@@ -1 +1,5 @@
-<h1>You have allowed this request</h1>
\ No newline at end of file
+<h1>You have allowed this request</h1>
+
+<% if @token.oob? %>
+<p>The verification code is <%= @token.verifier %></p>
+<% end %>