omniauth-renren-oauth2 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/strategies/renren.rb +5 -6
- data/lib/omniauth-renren-oauth2/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8423eb51d7715c01fd170338082fc184ef5385f7
|
4
|
+
data.tar.gz: 31c458b5c437b559230603d42fff0e8afeae2205
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7704a7b6ef47be2535882deff859134abb1c231e9f6ebe3929c2f0ea593f642eda76f213f2738d22fdfae2c910f89aa3c0192785a2dbd2e3bd182feca43e1faf
|
7
|
+
data.tar.gz: e4a2d085bdb0c0f10207107eb901a9858eb902dbf7a2376a927cac9f1907d9576c829d2ab3bbed7dee58054ed4cc756c1014efd642476100957d82d774b190d6
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'omniauth-oauth2'
|
2
|
-
require 'multi_json'
|
3
2
|
|
4
3
|
module OmniAuth
|
5
4
|
module Strategies
|
@@ -10,15 +9,15 @@ module OmniAuth
|
|
10
9
|
:token_url => '/oauth/token'
|
11
10
|
}
|
12
11
|
|
13
|
-
uid { raw_info['
|
12
|
+
uid { raw_info['id'] }
|
14
13
|
|
15
14
|
info do
|
16
15
|
{
|
17
16
|
:name => raw_info['name'],
|
18
17
|
:nickname => raw_info['name'],
|
19
|
-
:image => raw_info[
|
18
|
+
:image => raw_info['avatar'][0]['url'],
|
20
19
|
:urls => {
|
21
|
-
'Renren' => "http://www.renren.com/#{raw_info["
|
20
|
+
'Renren' => "http://www.renren.com/#{raw_info["id"]}/profile"
|
22
21
|
}
|
23
22
|
}
|
24
23
|
end
|
@@ -32,8 +31,8 @@ module OmniAuth
|
|
32
31
|
def raw_info
|
33
32
|
access_token.options[:mode] = :query
|
34
33
|
access_token.options[:param_name] = 'access_token'
|
35
|
-
|
36
|
-
@raw_info ||=
|
34
|
+
@uid ||= access_token.get("https://api.renren.com/v2/user/login/get").parsed['response']['id']
|
35
|
+
@raw_info ||= access_token.get("https://api.renren.com/v2/user/get", :params => {'userId' => @uid}).parsed['response']
|
37
36
|
end
|
38
37
|
end
|
39
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-renren-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ye.li
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.0.
|
76
|
+
rubygems_version: 2.0.3
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: OmniAuth Oauth2 strategy for renren.com
|