From 795ea504257c5f4553136c1fd0eb25411e30035b Mon Sep 17 00:00:00 2001 From: angel brown Date: Wed, 20 Jun 2012 15:28:14 -0400 Subject: [PATCH] changing callback_path to callback_url to take into account relative root url --- lib/omniauth/strategies/ldap.rb | 2 +- spec/omniauth/strategies/ldap_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/omniauth/strategies/ldap.rb b/lib/omniauth/strategies/ldap.rb index 45fb1d1..91cedd9 100644 --- a/lib/omniauth/strategies/ldap.rb +++ b/lib/omniauth/strategies/ldap.rb @@ -28,7 +28,7 @@ class MissingCredentialsError < StandardError; end def request_phase OmniAuth::LDAP::Adaptor.validate @options - f = OmniAuth::Form.new(:title => (options[:title] || "LDAP Authentication"), :url => callback_path) + f = OmniAuth::Form.new(:title => (options[:title] || "LDAP Authentication"), :url => callback_url) f.text_field 'Login', 'username' f.password_field 'Password', 'password' f.button "Sign In" diff --git a/spec/omniauth/strategies/ldap_spec.rb b/spec/omniauth/strategies/ldap_spec.rb index 2a39f79..cdeb44c 100644 --- a/spec/omniauth/strategies/ldap_spec.rb +++ b/spec/omniauth/strategies/ldap_spec.rb @@ -35,7 +35,7 @@ def session end it 'should have the callback as the action for the form' do - last_response.body.should be_include("action='/auth/ldap/callback'") + last_response.body.should be_include("action='http://example.org/auth/ldap/callback'") end it 'should have a text field for each of the fields' do