17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/omniauth/strategies/cmu.rb', line 17
def auth_hash username
andrew_id = username.match(/^(.*)@/)[1]
attrs = lookup_andrew_id(andrew_id)
OmniAuth::Utils.deep_merge(super, {
'uid' => andrew_id,
'provider' => 'cmu',
'user_info' => {
'name' => attrs[:cn],
'email' => attrs[:mail],
'nickname' => attrs[:nickname],
'first_name' => attrs[:givenname],
'last_name' => attrs[:sn],
'class' => attrs[:cmustudentclass],
'department' => attrs[:cmudepartment],
'location' => attrs[:cmucampus]
},
'extra' => {'user_hash' => attrs}
})
end
|