omniauth-auth0 1.4.1 → 1.4.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.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Auth0
3
- VERSION = "1.4.1"
3
+ VERSION = "1.4.2"
4
4
  end
5
5
  end
@@ -14,19 +14,32 @@ module OmniAuth
14
14
  option :provider_ignores_state, true
15
15
  option :connection
16
16
 
17
+ option :client_options, {
18
+ authorize_url: "/authorize",
19
+ token_url: "/oauth/token",
20
+ userinfo_url: "/userinfo"
21
+ }
22
+
17
23
  args [:client_id, :client_secret, :namespace, :provider_ignores_state, :connection]
18
24
 
19
25
  def initialize(app, *args, &block)
20
26
  super
21
- fail(ArgumentError.new("Received wrong number of arguments. #{args.inspect}")) if @options[:namespace].nil?
22
27
 
23
- @options.provider_ignores_state = args[3] unless args[3].nil?
24
- @options.connection = args[4] unless args[4].nil?
28
+ if options[:namespace]
29
+ @options.provider_ignores_state = args[3] unless args[3].nil?
30
+ @options.connection = args[4] unless args[4].nil?
25
31
 
26
- @options.client_options.site = "https://#{options[:namespace]}"
27
- @options.client_options.authorize_url = "https://#{options[:namespace]}/authorize?#{client_info_querystring}"
28
- @options.client_options.token_url = "https://#{options[:namespace]}/oauth/token?#{client_info_querystring}"
29
- @options.client_options.userinfo_url = "https://#{options[:namespace]}/userinfo"
32
+ @options.client_options.site =
33
+ "https://#{options[:namespace]}"
34
+ @options.client_options.authorize_url =
35
+ "https://#{options[:namespace]}/authorize?#{self.class.client_info_querystring}"
36
+ @options.client_options.token_url =
37
+ "https://#{options[:namespace]}/oauth/token?#{self.class.client_info_querystring}"
38
+ @options.client_options.userinfo_url =
39
+ "https://#{options[:namespace]}/userinfo"
40
+ elsif !options[:setup]
41
+ fail(ArgumentError.new("Received wrong number of arguments. #{args.inspect}"))
42
+ end
30
43
  end
31
44
 
32
45
  def authorize_params
@@ -73,8 +86,7 @@ module OmniAuth
73
86
  @raw_info ||= access_token.get(options.client_options.userinfo_url).parsed
74
87
  end
75
88
 
76
- private
77
- def client_info_querystring
89
+ def self.client_info_querystring
78
90
  client_info = JSON.dump({name: 'omniauth-auth0', version: OmniAuth::Auth0::VERSION})
79
91
  "auth0Client=" + Base64.urlsafe_encode64(client_info)
80
92
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-auth0
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Auth0
@@ -10,128 +10,128 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-18 00:00:00.000000000 Z
13
+ date: 2016-06-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: omniauth-oauth2
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  version: '1.1'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rspec
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ~>
34
34
  - !ruby/object:Gem::Version
35
35
  version: '2.7'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ~>
41
41
  - !ruby/object:Gem::Version
42
42
  version: '2.7'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rack-test
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0.6'
50
- - - ">="
50
+ - - '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.6.3
53
53
  type: :development
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
57
+ - - ~>
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0.6'
60
- - - ">="
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: 0.6.3
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: simplecov
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0.9'
70
- - - ">="
70
+ - - '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: 0.9.1
73
73
  type: :development
74
74
  prerelease: false
75
75
  version_requirements: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - "~>"
77
+ - - ~>
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0.9'
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.9.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.20'
90
- - - ">="
90
+ - - '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: 1.20.4
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - "~>"
97
+ - - ~>
98
98
  - !ruby/object:Gem::Version
99
99
  version: '1.20'
100
- - - ">="
100
+ - - '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: 1.20.4
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rake
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
107
+ - - ~>
108
108
  - !ruby/object:Gem::Version
109
109
  version: '10.3'
110
- - - ">="
110
+ - - '>='
111
111
  - !ruby/object:Gem::Version
112
112
  version: 10.3.2
113
113
  type: :development
114
114
  prerelease: false
115
115
  version_requirements: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - "~>"
117
+ - - ~>
118
118
  - !ruby/object:Gem::Version
119
119
  version: '10.3'
120
- - - ">="
120
+ - - '>='
121
121
  - !ruby/object:Gem::Version
122
122
  version: 10.3.2
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: gem-release
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - "~>"
127
+ - - ~>
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0.7'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - "~>"
134
+ - - ~>
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0.7'
137
137
  description: |
@@ -146,9 +146,9 @@ executables: []
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
- - ".gemrelease"
150
- - ".gitignore"
151
- - ".travis.yml"
149
+ - .gemrelease
150
+ - .gitignore
151
+ - .travis.yml
152
152
  - CHANGELOG.md
153
153
  - Gemfile
154
154
  - LICENSE
@@ -197,6 +197,7 @@ files:
197
197
  - examples/ruby-on-rails-webapp/config/initializers/backtrace_silencers.rb
198
198
  - examples/ruby-on-rails-webapp/config/initializers/cookies_serializer.rb
199
199
  - examples/ruby-on-rails-webapp/config/initializers/filter_parameter_logging.rb
200
+ - examples/ruby-on-rails-webapp/config/initializers/fix_ssl.rb
200
201
  - examples/ruby-on-rails-webapp/config/initializers/inflections.rb
201
202
  - examples/ruby-on-rails-webapp/config/initializers/mime_types.rb
202
203
  - examples/ruby-on-rails-webapp/config/initializers/session_store.rb
@@ -206,6 +207,7 @@ files:
206
207
  - examples/ruby-on-rails-webapp/config/secrets.yml
207
208
  - examples/ruby-on-rails-webapp/db/seeds.rb
208
209
  - examples/ruby-on-rails-webapp/lib/assets/.keep
210
+ - examples/ruby-on-rails-webapp/lib/ca-bundle.crt
209
211
  - examples/ruby-on-rails-webapp/lib/tasks/.keep
210
212
  - examples/ruby-on-rails-webapp/log/.keep
211
213
  - examples/ruby-on-rails-webapp/public/404.html
@@ -244,17 +246,17 @@ require_paths:
244
246
  - lib
245
247
  required_ruby_version: !ruby/object:Gem::Requirement
246
248
  requirements:
247
- - - ">="
249
+ - - '>='
248
250
  - !ruby/object:Gem::Version
249
251
  version: '0'
250
252
  required_rubygems_version: !ruby/object:Gem::Requirement
251
253
  requirements:
252
- - - ">="
254
+ - - '>='
253
255
  - !ruby/object:Gem::Version
254
256
  version: '0'
255
257
  requirements: []
256
258
  rubyforge_project: omniauth-auth0
257
- rubygems_version: 2.4.5
259
+ rubygems_version: 2.4.6
258
260
  signing_key:
259
261
  specification_version: 4
260
262
  summary: Omniauth OAuth2 strategy for the Auth0 platform.