omniauth-singly 0.1.0 → 0.2.0

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.
@@ -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.merge(
16
- :service => request.params["service"],
17
- :scope => request.params["scope"]
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"] }
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Singly
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.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-24 00:00:00.000000000 Z
12
+ date: 2012-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth