omniauth-weasyl 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/omniauth/strategies/weasyl.rb +7 -1
- data/omniauth-weasyl.gemspec +1 -1
- metadata +1 -1
@@ -30,6 +30,12 @@ module OmniAuth
|
|
30
30
|
{ 'raw_info' => raw_info }
|
31
31
|
end
|
32
32
|
|
33
|
+
def auth_hash
|
34
|
+
h = super
|
35
|
+
h.username = raw_info['login']
|
36
|
+
h
|
37
|
+
end
|
38
|
+
|
33
39
|
alias :oauth2_access_token :access_token
|
34
40
|
|
35
41
|
def access_token
|
@@ -42,7 +48,7 @@ module OmniAuth
|
|
42
48
|
end
|
43
49
|
|
44
50
|
def raw_info
|
45
|
-
MultiJson.load access_token.get('/api/whoami').body
|
51
|
+
@raw_info ||= MultiJson.load access_token.get('/api/whoami').body
|
46
52
|
end
|
47
53
|
end
|
48
54
|
end
|
data/omniauth-weasyl.gemspec
CHANGED