Skip to content

Commit

Permalink
Merge branch 'master' of github.com:chamill/omniauth-cas into chamill…
Browse files Browse the repository at this point in the history
…-master

Conflicts:
	lib/omniauth/strategies/cas.rb
  • Loading branch information
Derek Lindahl committed Sep 29, 2014
2 parents 69e9f39 + f2506c1 commit 89ef38e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/omniauth/strategies/cas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,20 @@ class InvalidCASTicket < StandardError; end
option :uid_field, 'user'
option :name_key, 'name'
option :email_key, 'email'
option :nickname_key, 'user'
option :first_name_key, 'first_name'
option :last_name_key, 'last_name'
option :location_key, 'location'
option :image_key, 'image'
option :phone_key, 'phone'

# As required by https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema
AuthHashSchemaKeys = %w{name email first_name last_name location image phone}
AuthHashSchemaKeys = %w{name email nickname first_name last_name location image phone}
info do
prune!({
name: raw_info[options[:name_key].to_s],
email: raw_info[options[:email_key].to_s],
nickname: raw_info[options[:nickname_key].to_s],
first_name: raw_info[options[:first_name_key].to_s],
last_name: raw_info[options[:last_name_key].to_s],
location: raw_info[options[:location_key].to_s],
Expand Down
1 change: 1 addition & 0 deletions spec/omniauth/strategies/cas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
expect(subject.name).to eq 'Peter Segel'
expect(subject.first_name).to eq 'Peter'
expect(subject.last_name).to eq 'Segel'
expect(subject.nickname).to eq 'psegel'
expect(subject.email).to eq 'psegel@intridea.com'
expect(subject.location).to eq 'Washington, D.C.'
expect(subject.image).to eq '/images/user.jpg'
Expand Down

0 comments on commit 89ef38e

Please sign in to comment.