Skip to content
Browse files

Cosmetic method name change in wake of offloading all session manglin…

…g to that method.
  • Loading branch information...
1 parent 1f86eec commit de16184897330ee39158ff4d3de3d1496f3c649d @Slotos committed
Showing with 5 additions and 5 deletions.
  1. +2 −2 lib/casserver/server.rb
  2. +1 −1 spec/strategy_dummy.rb
  3. +2 −2 spec/strategy_spec.rb
View
4 lib/casserver/server.rb
@@ -529,7 +529,7 @@ def self.init_database!
if credentials_are_valid
$LOG.info("Credentials for username '#{@username}' successfully validated using #{successful_authenticator.class.name}.")
- confirm_authentication!(@username, @service, extra_attributes)
+ establish_session!(@username, @service, extra_attributes)
else
$LOG.warn("Invalid credentials given for user '#{@username}'")
@message = {:type => 'mistake', :message => t.error.incorrect_username_or_password}
@@ -791,7 +791,7 @@ def compile_template(engine, data, options, views)
super engine, data, options, views
end
- def confirm_authentication!(username, service = nil, *args)
+ def establish_session!(username, service = nil, *args)
extra_attributes = args.extract_options!
$LOG.debug("Authenticator provided additional user attributes: #{extra_attributes.inspect}") unless extra_attributes.blank?
View
2 spec/strategy_dummy.rb
@@ -4,7 +4,7 @@ module Dummy
def self.registered(app)
app.get '/confirm_authentication' do
- confirm_authentication!("someone", params[:service])
+ establish_session!("someone", params[:service])
end
end
View
4 spec/strategy_spec.rb
@@ -26,7 +26,7 @@
end
end
- describe "confirm_authentication" do
+ describe "establish_session" do
it "should set tgc" do
@browser.get '/confirm_authentication'
@browser.instance_variable_get(:@rack_mock_session).cookie_jar["tgt"].should =~ /^TGC-[0-9rA-Z]+$/
@@ -39,7 +39,7 @@
end
it "should not redirect to service if service is not a valid URI" do
- service = "Hey, I'm not an URI, seriously!"
+ service = CGI.escape("Hey, I'm not an URI, seriously!")
@browser.get "/confirm_authentication?service=#{service}"
@browser.last_response.should_not be_redirect
end

0 comments on commit de16184

Please sign in to comment.
Something went wrong with that request. Please try again.