mirror of
https://github.com/omniauth/omniauth.git
synced 2022-11-09 12:31:49 -05:00
flickr user_info change of schema from username/fullname to nickname/name
This commit is contained in:
parent
7b3644fd62
commit
78ae411ea5
1 changed files with 10 additions and 1 deletions
|
@ -64,11 +64,20 @@ module OmniAuth
|
|||
OmniAuth::Utils.deep_merge(super, {
|
||||
'uid' => @user['nsid'],
|
||||
'credentials' => { 'token' => @access_token },
|
||||
'user_info' => @user,
|
||||
'user_info' => user_info,
|
||||
'extra' => { 'user_hash' => @user }
|
||||
})
|
||||
end
|
||||
|
||||
def user_info
|
||||
name = @user['fullname']
|
||||
name = @user['username'] if name.nil? || name.empty?
|
||||
{
|
||||
'nickname' => @user['username'],
|
||||
'name' => name,
|
||||
}
|
||||
end
|
||||
|
||||
def flickr_sign(params)
|
||||
Digest::MD5.hexdigest(secret_key + params.sort{|a,b| a[0].to_s <=> b[0].to_s }.flatten.join)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue