From 698a014aa48e022d1430a34dfce552513762de93 Mon Sep 17 00:00:00 2001 From: Daniel Ghilea Date: Fri, 21 Jun 2013 15:57:10 +0100 Subject: [PATCH] Fixing #179: calling stringify_keys on the extra_attributes hash. Improve Daniel's work and move stringify_keys to lib/casserver/authenticators/base.rb. --- lib/casserver/authenticators/base.rb | 2 +- lib/casserver/server.rb | 2 +- spec/casserver/authenticators/ldap_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/casserver/authenticators/base.rb b/lib/casserver/authenticators/base.rb index 240a68e..ca45242 100644 --- a/lib/casserver/authenticators/base.rb +++ b/lib/casserver/authenticators/base.rb @@ -38,7 +38,7 @@ module CASServer end def extra_attributes - @extra_attributes + @extra_attributes.stringify_keys end protected diff --git a/lib/casserver/server.rb b/lib/casserver/server.rb index 7a3f4c9..77f7633 100644 --- a/lib/casserver/server.rb +++ b/lib/casserver/server.rb @@ -785,4 +785,4 @@ module CASServer end end end -end \ No newline at end of file +end diff --git a/spec/casserver/authenticators/ldap_spec.rb b/spec/casserver/authenticators/ldap_spec.rb index 9b61252..3a87720 100644 --- a/spec/casserver/authenticators/ldap_spec.rb +++ b/spec/casserver/authenticators/ldap_spec.rb @@ -50,7 +50,7 @@ describe "CASServer::Authenticators::LDAP" do :request => {} ).should == true - auth.extra_attributes.should == {:full_name => 'Test', :address => 'Test'} + auth.extra_attributes.should == {"full_name" => 'Test', "address" => 'Test'} end end