omniauth-singly 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/omniauth/strategies/singly.rb +11 -4
- data/lib/omniauth-singly/version.rb +1 -1
- metadata +2 -2
@@ -3,6 +3,12 @@ require "omniauth-oauth2"
|
|
3
3
|
module OmniAuth
|
4
4
|
module Strategies
|
5
5
|
class Singly < OmniAuth::Strategies::OAuth2
|
6
|
+
PASSTHROUGHS = %w[
|
7
|
+
account
|
8
|
+
scope
|
9
|
+
service
|
10
|
+
]
|
11
|
+
|
6
12
|
option :name, "singly"
|
7
13
|
|
8
14
|
option :client_options, {
|
@@ -12,10 +18,11 @@ module OmniAuth
|
|
12
18
|
}
|
13
19
|
|
14
20
|
def authorize_params
|
15
|
-
super.
|
16
|
-
|
17
|
-
|
18
|
-
|
21
|
+
super.tap do |params|
|
22
|
+
PASSTHROUGHS.each do |p|
|
23
|
+
params[p.to_sym] = request.params[p] if request.params[p]
|
24
|
+
end
|
25
|
+
end
|
19
26
|
end
|
20
27
|
|
21
28
|
uid { raw_info["id"] }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-singly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|