File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -57,18 +57,18 @@ def request_phase
5757 # Fast-path: if a trusted identity header is present, skip the login form
5858 # and jump to the callback where we will complete using directory lookup.
5959 if header_username
60- return Rack ::Response . new ( [ ] , 302 , "Location" => callback_path ) . finish
60+ return Rack ::Response . new ( [ ] , 302 , "Location" => callback_url ) . finish
6161 end
6262
6363 # If credentials were POSTed directly to /auth/:provider, redirect to the callback path.
6464 # This mirrors the behavior of many OmniAuth providers and allows test helpers (like
6565 # OmniAuth::Test::PhonySession) to populate `env['omniauth.auth']` on the callback request.
6666 if request . post? && request . params [ "username" ] . to_s != "" && request . params [ "password" ] . to_s != ""
67- return Rack ::Response . new ( [ ] , 302 , "Location" => callback_path ) . finish
67+ return Rack ::Response . new ( [ ] , 302 , "Location" => callback_url ) . finish
6868 end
6969
7070 OmniAuth ::LDAP ::Adaptor . validate ( @options )
71- f = OmniAuth ::Form . new ( title : options [ :title ] || "LDAP Authentication" , url : callback_path )
71+ f = OmniAuth ::Form . new ( title : options [ :title ] || "LDAP Authentication" , url : callback_url )
7272 f . text_field ( "Login" , "username" )
7373 f . password_field ( "Password" , "password" )
7474 f . button ( "Sign In" )
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def make_env(path = "/auth/ldap", props = {})
7070 end
7171
7272 it "has the callback as the action for the form" do
73- expect ( last_response . body ) . to include ( "action='/auth/ldap/callback'" )
73+ expect ( last_response . body ) . to include ( "action='http://example.org /auth/ldap/callback'" )
7474 end
7575
7676 it "has a text field for each of the fields" do
You can’t perform that action at this time.
0 commit comments