Skip to content

Commit 698a014

Browse files
Daniel GhileaRobert Mitwicki
authored andcommitted
Fixing #179: calling stringify_keys on the extra_attributes hash.
Improve Daniel's work and move stringify_keys to lib/casserver/authenticators/base.rb.
1 parent 81fcd5f commit 698a014

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/casserver/authenticators/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def validate(credentials)
3838
end
3939

4040
def extra_attributes
41-
@extra_attributes
41+
@extra_attributes.stringify_keys
4242
end
4343

4444
protected

lib/casserver/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,4 +785,4 @@ def authenticated_username
785785
end
786786
end
787787
end
788-
end
788+
end

spec/casserver/authenticators/ldap_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
:request => {}
5151
).should == true
5252

53-
auth.extra_attributes.should == {:full_name => 'Test', :address => 'Test'}
53+
auth.extra_attributes.should == {"full_name" => 'Test', "address" => 'Test'}
5454
end
5555

5656
end

0 commit comments

Comments
 (0)