omniauth 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of omniauth might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 06e30f31bdee870b242a81af5c01e813539e8030
4
- data.tar.gz: c417d4689e17580d7f018205c298f41d3ff3c644
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTMwM2I1Y2EyNDQ0YTgwZTk5NmI0Mjk4YmExMjVmM2UwYWVhYjIyYg==
5
+ data.tar.gz: !binary |-
6
+ NjY4NjQ5MjJlMzIzY2Q0ZTRhNmNhNDc5ODdiN2Y0ZDM2NDdiZTNjMQ==
5
7
  SHA512:
6
- metadata.gz: 2b3928add7b13234a4272afa70076b7e13c76256f9ca55c40aa50fd435f108609621b7ae0954407880a51422f5354b40b4332478e6df7f15cfc5cb16167e476a
7
- data.tar.gz: a2706e7afe3eb62b911c151d216f2b22fa02b92f4c0e0aa08ad89fd627bb90ec8c5a2d8fc58b0bdbca87a664775ab7654ec3f83cf568581d3402d3d78b6189a0
8
+ metadata.gz: !binary |-
9
+ ZTYxZjYyZmI1OTEzZDYzMjM2ZDdjNWQ3ODdhMTM1MDdiOWEyZjMyYTJmMzUz
10
+ NDY2MmJjMDJlNGQwNjg5ZmQ5OTIxYjlmMDZjMjI5YzgzZDRlZjQzOGFmMDcz
11
+ MmFmNGRlOTU3Mzg5ZmUyNWE2ZDlhZTA0MWNiMzUyYjhjNTg4ZDM=
12
+ data.tar.gz: !binary |-
13
+ MWU5OGY4Mzc0NmVmMTJiNmNhNjg1N2U0NTU3MTgyY2JmZmViZTUyOGQ3NzAy
14
+ M2ZjZGJhYjFmNmEzZjNkMDlmOGY3MDc0ZDFkY2U0OTVmYzY2YWQxMDg2MDM3
15
+ NTg3MzY2NzQyNWJmMTI4NGIxZjdiZmZiZGNhZmZlNjE2YTFkMzM=
data/.rubocop.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  Lint/HandleExceptions:
2
2
  Enabled: false
3
3
 
4
+ Metrics/BlockLength:
5
+ Enabled: false
6
+
4
7
  Metrics/BlockNesting:
5
8
  Max: 2
6
9
 
data/.travis.yml CHANGED
@@ -1,33 +1,25 @@
1
1
  bundler_args: --without development
2
- before_install: gem install bundler
2
+ before_install: gem update bundler
3
3
  cache: bundler
4
4
  env:
5
5
  global:
6
6
  - JRUBY_OPTS="$JRUBY_OPTS --debug"
7
- gemfile:
8
- - Gemfile
9
- - Gemfile.rack-1.3.x
10
7
  language: ruby
11
8
  rvm:
12
- - jruby-18mode
13
9
  - jruby-19mode
14
10
  - jruby-9000
15
11
  - 1.8.7
16
12
  - 1.9.3
17
13
  - 2.0.0
18
- - 2.1
19
- - 2.2
14
+ - 2.1.10
15
+ - 2.2.5
16
+ - 2.3.3
17
+ - 2.4.0
20
18
  - jruby-head
21
- - rbx-2
22
19
  - ruby-head
23
20
  matrix:
24
- include:
25
- - rvm: 2.2.2
26
- gemfile: Gemfile.rack-master
27
21
  allow_failures:
28
22
  - rvm: jruby-head
29
- - rvm: rbx-2
30
23
  - rvm: ruby-head
31
- - gemfile: Gemfile.rack-master
32
24
  fast_finish: true
33
25
  sudo: false
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'jruby-openssl', :platforms => :jruby
4
- gem 'rake'
4
+ gem 'rake', '~> 10.5'
5
5
  gem 'yard'
6
6
 
7
7
  group :development do
@@ -10,15 +10,16 @@ group :development do
10
10
  end
11
11
 
12
12
  group :test do
13
- gem 'coveralls'
14
13
  gem 'hashie', '~> 2.0.5', :platforms => [:jruby_18, :ruby_18]
15
- gem 'json', '>= 1.8.1', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19]
14
+ gem 'json', '~> 1.8', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19]
16
15
  gem 'mime-types', '~> 1.25', :platforms => [:jruby_18, :ruby_18]
16
+ gem 'rack', '~> 1.0', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19, :ruby_20, :ruby_21]
17
17
  gem 'rack-test'
18
18
  gem 'rest-client', '~> 1.6.0', :platforms => [:jruby_18, :ruby_18]
19
19
  gem 'rspec', '~> 3.0'
20
- gem 'rubocop', '>= 0.25', :platforms => [:ruby_19, :ruby_20, :ruby_21, :ruby_22]
20
+ gem 'rubocop', '>= 0.25', :platforms => [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24]
21
21
  gem 'simplecov', '>= 0.9'
22
+ gem 'tins', '~> 1.6.0', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19]
22
23
  end
23
24
 
24
25
  gemspec
data/README.md CHANGED
@@ -1,21 +1,21 @@
1
1
  # OmniAuth: Standardized Multi-Provider Authentication
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/omniauth.svg)][gem]
4
- [![Build Status](http://img.shields.io/travis/intridea/omniauth.svg)][travis]
5
- [![Dependency Status](http://img.shields.io/gemnasium/intridea/omniauth.svg)][gemnasium]
6
- [![Code Climate](http://img.shields.io/codeclimate/github/intridea/omniauth.svg)][codeclimate]
7
- [![Coverage Status](http://img.shields.io/coveralls/intridea/omniauth.svg)][coveralls]
8
- [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/intridea/omniauth/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
4
+ [![Build Status](http://img.shields.io/travis/omniauth/omniauth.svg)][travis]
5
+ [![Dependency Status](http://img.shields.io/gemnasium/omniauth/omniauth.svg)][gemnasium]
6
+ [![Code Climate](http://img.shields.io/codeclimate/github/omniauth/omniauth.svg)][codeclimate]
7
+ [![Coverage Status](http://img.shields.io/coveralls/omniauth/omniauth.svg)][coveralls]
8
+ [![Security](https://hakiri.io/github/omniauth/omniauth/master.svg)](https://hakiri.io/github/omniauth/omniauth/master)
9
9
 
10
10
  [gem]: https://rubygems.org/gems/omniauth
11
- [travis]: http://travis-ci.org/intridea/omniauth
12
- [gemnasium]: https://gemnasium.com/intridea/omniauth
13
- [codeclimate]: https://codeclimate.com/github/intridea/omniauth
14
- [coveralls]: https://coveralls.io/r/intridea/omniauth
11
+ [travis]: http://travis-ci.org/omniauth/omniauth
12
+ [gemnasium]: https://gemnasium.com/omniauth/omniauth
13
+ [codeclimate]: https://codeclimate.com/github/omniauth/omniauth
14
+ [coveralls]: https://coveralls.io/r/omniauth/omniauth
15
15
 
16
16
  **OmniAuth 1.0 has several breaking changes from version 0.x. You can set
17
17
  the dependency to `~> 0.3.2` if you do not wish to make the more difficult
18
- upgrade. See [the wiki](https://github.com/intridea/omniauth/wiki/Upgrading-to-1.0)
18
+ upgrade. See [the wiki](https://github.com/omniauth/omniauth/wiki/Upgrading-to-1.0)
19
19
  for more information.**
20
20
 
21
21
  ## An Introduction
@@ -27,7 +27,7 @@ have been created for everything from Facebook to LDAP.
27
27
 
28
28
  In order to use OmniAuth in your applications, you will need to leverage
29
29
  one or more strategies. These strategies are generally released
30
- individually as RubyGems, and you can see a [community maintained list](https://github.com/intridea/omniauth/wiki/List-of-Strategies)
30
+ individually as RubyGems, and you can see a [community maintained list](https://github.com/omniauth/omniauth/wiki/List-of-Strategies)
31
31
  on the wiki for this project.
32
32
 
33
33
  One strategy, called `Developer`, is included with OmniAuth and provides
@@ -120,7 +120,7 @@ Authentication Hash which will contain information about the just
120
120
  authenticated user including a unique id, the strategy they just used
121
121
  for authentication, and personal details such as name and email address
122
122
  as available. For an in-depth description of what the authentication
123
- hash might contain, see the [Auth Hash Schema wiki page](https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema).
123
+ hash might contain, see the [Auth Hash Schema wiki page](https://github.com/omniauth/omniauth/wiki/Auth-Hash-Schema).
124
124
 
125
125
  Note that OmniAuth does not perform any actions beyond setting some
126
126
  environment information on the callback request. It is entirely up to
@@ -137,13 +137,13 @@ OmniAuth.config.logger = Rails.logger
137
137
  ```
138
138
 
139
139
  ## Resources
140
- The [OmniAuth Wiki](https://github.com/intridea/omniauth/wiki) has
140
+ The [OmniAuth Wiki](https://github.com/omniauth/omniauth/wiki) has
141
141
  actively maintained in-depth documentation for OmniAuth. It should be
142
142
  your first stop if you are wondering about a more in-depth look at
143
143
  OmniAuth, how it works, and how to use it.
144
144
 
145
145
  ## Supported Ruby Versions
146
- OmniAuth is tested under 1.8.7, 1.9.3, 2.0.0, 2.1.0, JRuby, and Rubinius.
146
+ OmniAuth is tested under 1.8.7, 1.9.3, 2.0.0, 2.1.10, 2.2.5, 2.3.1, and JRuby.
147
147
 
148
148
  ## Versioning
149
149
  This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations
@@ -158,7 +158,7 @@ Constraint][pvc] with two digits of precision. For example:
158
158
  spec.add_dependency 'omniauth', '~> 1.0'
159
159
 
160
160
  [semver]: http://semver.org/
161
- [pvc]: http://docs.rubygems.org/read/chapter/16#page74
161
+ [pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
162
162
 
163
163
  ## License
164
164
  Copyright (c) 2010-2013 Michael Bleigh and Intridea, Inc. See [LICENSE][] for
@@ -42,7 +42,7 @@ module OmniAuth
42
42
  def name?
43
43
  !!name
44
44
  end
45
- alias_method :valid?, :name?
45
+ alias valid? name?
46
46
 
47
47
  def to_hash
48
48
  hash = super
@@ -49,7 +49,7 @@ module OmniAuth
49
49
  middleware = klass
50
50
  else
51
51
  begin
52
- middleware = OmniAuth::Strategies.const_get("#{OmniAuth::Utils.camelize(klass.to_s)}")
52
+ middleware = OmniAuth::Strategies.const_get(OmniAuth::Utils.camelize(klass.to_s).to_s)
53
53
  rescue NameError
54
54
  raise(LoadError.new("Could not find matching strategy for #{klass.inspect}. You may need to install an additional gem (such as omniauth-#{klass})."))
55
55
  end
@@ -22,7 +22,7 @@ module OmniAuth
22
22
  end
23
23
 
24
24
  def raise_out!
25
- fail(env['omniauth.error'] || OmniAuth::Error.new(env['omniauth.error.type']))
25
+ raise(env['omniauth.error'] || OmniAuth::Error.new(env['omniauth.error.type']))
26
26
  end
27
27
 
28
28
  def redirect_to_failure
@@ -140,7 +140,7 @@ module OmniAuth
140
140
  end
141
141
 
142
142
  # Make sure that all of the args have been dealt with, otherwise error out.
143
- fail(ArgumentError.new("Received wrong number of arguments. #{args.inspect}")) unless args.empty?
143
+ raise(ArgumentError.new("Received wrong number of arguments. #{args.inspect}")) unless args.empty?
144
144
 
145
145
  yield options if block_given?
146
146
  end
@@ -172,7 +172,7 @@ module OmniAuth
172
172
  def call!(env) # rubocop:disable CyclomaticComplexity, PerceivedComplexity
173
173
  unless env['rack.session']
174
174
  error = OmniAuth::NoSessionError.new('You must provide a session to use OmniAuth.')
175
- fail(error)
175
+ raise(error)
176
176
  end
177
177
 
178
178
  @env = env
@@ -198,7 +198,7 @@ module OmniAuth
198
198
  setup_phase
199
199
  log :info, 'Request phase initiated.'
200
200
  # store query params from the request url, extracted in the callback_phase
201
- session['omniauth.params'] = request.params
201
+ session['omniauth.params'] = request.GET
202
202
  OmniAuth.config.before_request_phase.call(env) if OmniAuth.config.before_request_phase
203
203
  if options.form.respond_to?(:call)
204
204
  log :info, 'Rendering form from supplied Rack endpoint.'
@@ -246,7 +246,7 @@ module OmniAuth
246
246
  end
247
247
 
248
248
  def on_path?(path)
249
- current_path.casecmp(path) == 0
249
+ current_path.casecmp(path).zero?
250
250
  end
251
251
 
252
252
  def options_request?
@@ -265,7 +265,7 @@ module OmniAuth
265
265
  def mock_request_call
266
266
  setup_phase
267
267
 
268
- session['omniauth.params'] = request.params
268
+ session['omniauth.params'] = request.GET
269
269
  OmniAuth.config.before_request_phase.call(env) if OmniAuth.config.before_request_phase
270
270
  if request.params['origin']
271
271
  @env['rack.session']['omniauth.origin'] = request.params['origin']
@@ -310,7 +310,7 @@ module OmniAuth
310
310
  # perform any information gathering you need to be able to authenticate
311
311
  # the user in this phase.
312
312
  def request_phase
313
- fail(NotImplementedError)
313
+ raise(NotImplementedError)
314
314
  end
315
315
 
316
316
  def uid
@@ -347,14 +347,9 @@ module OmniAuth
347
347
  #
348
348
  # use MyStrategy, :skip_info => lambda{|uid| User.find_by_uid(uid)}
349
349
  def skip_info?
350
- if options.skip_info?
351
- if options.skip_info.respond_to?(:call)
352
- return options.skip_info.call(uid)
353
- else
354
- return true
355
- end
356
- end
357
- false
350
+ return false unless options.skip_info?
351
+ return true unless options.skip_info.respond_to?(:call)
352
+ options.skip_info.call(uid)
358
353
  end
359
354
 
360
355
  def callback_phase
@@ -37,7 +37,7 @@ module OmniAuth
37
37
 
38
38
  def strategy
39
39
  error = NotImplementedError.new('Including specs must define #strategy')
40
- fail(error)
40
+ raise(error)
41
41
  end
42
42
  end
43
43
  end
@@ -1,3 +1,3 @@
1
1
  module OmniAuth
2
- VERSION = '1.3.1'
2
+ VERSION = '1.3.2'.freeze
3
3
  end
data/omniauth.gemspec CHANGED
@@ -7,11 +7,12 @@ Gem::Specification.new do |spec|
7
7
  spec.add_dependency 'hashie', ['>= 1.2', '< 4']
8
8
  spec.add_dependency 'rack', ['>= 1.0', '< 3']
9
9
  spec.add_development_dependency 'bundler', '~> 1.0'
10
+ spec.add_development_dependency 'rake', '>= 10.5'
10
11
  spec.authors = ['Michael Bleigh', 'Erik Michaels-Ober', 'Tom Milewski']
11
12
  spec.description = 'A generalized Rack framework for multiple-provider authentication.'
12
13
  spec.email = ['michael@intridea.com', 'sferik@gmail.com', 'tmilewski@gmail.com']
13
14
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with?('spec/') }
14
- spec.homepage = 'http://github.com/intridea/omniauth'
15
+ spec.homepage = 'https://github.com/omniauth/omniauth'
15
16
  spec.licenses = %w(MIT)
16
17
  spec.name = 'omniauth'
17
18
  spec.require_paths = %w(lib)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
@@ -10,62 +10,78 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-20 00:00:00.000000000 Z
13
+ date: 2017-01-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hashie
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.2'
22
- - - "<"
22
+ - - <
23
23
  - !ruby/object:Gem::Version
24
24
  version: '4'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
- - - ">="
29
+ - - ! '>='
30
30
  - !ruby/object:Gem::Version
31
31
  version: '1.2'
32
- - - "<"
32
+ - - <
33
33
  - !ruby/object:Gem::Version
34
34
  version: '4'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rack
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - ! '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.0'
42
- - - "<"
42
+ - - <
43
43
  - !ruby/object:Gem::Version
44
44
  version: '3'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - ">="
49
+ - - ! '>='
50
50
  - !ruby/object:Gem::Version
51
51
  version: '1.0'
52
- - - "<"
52
+ - - <
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: !binary |-
76
+ MTAuNQ==
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: !binary |-
84
+ MTAuNQ==
69
85
  description: A generalized Rack framework for multiple-provider authentication.
70
86
  email:
71
87
  - michael@intridea.com
@@ -75,14 +91,12 @@ executables: []
75
91
  extensions: []
76
92
  extra_rdoc_files: []
77
93
  files:
78
- - ".gitignore"
79
- - ".rspec"
80
- - ".rubocop.yml"
81
- - ".travis.yml"
82
- - ".yardopts"
94
+ - .gitignore
95
+ - .rspec
96
+ - .rubocop.yml
97
+ - .travis.yml
98
+ - .yardopts
83
99
  - Gemfile
84
- - Gemfile.rack-1.3.x
85
- - Gemfile.rack-master
86
100
  - LICENSE.md
87
101
  - README.md
88
102
  - Rakefile
@@ -100,7 +114,7 @@ files:
100
114
  - lib/omniauth/test/strategy_test_case.rb
101
115
  - lib/omniauth/version.rb
102
116
  - omniauth.gemspec
103
- homepage: http://github.com/intridea/omniauth
117
+ homepage: https://github.com/omniauth/omniauth
104
118
  licenses:
105
119
  - MIT
106
120
  metadata: {}
@@ -110,12 +124,12 @@ require_paths:
110
124
  - lib
111
125
  required_ruby_version: !ruby/object:Gem::Requirement
112
126
  requirements:
113
- - - ">="
127
+ - - ! '>='
114
128
  - !ruby/object:Gem::Version
115
129
  version: '0'
116
130
  required_rubygems_version: !ruby/object:Gem::Requirement
117
131
  requirements:
118
- - - ">="
132
+ - - ! '>='
119
133
  - !ruby/object:Gem::Version
120
134
  version: 1.3.5
121
135
  requirements: []
@@ -125,4 +139,3 @@ signing_key:
125
139
  specification_version: 4
126
140
  summary: A generalized Rack framework for multiple-provider authentication.
127
141
  test_files: []
128
- has_rdoc:
data/Gemfile.rack-1.3.x DELETED
@@ -1,20 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'jruby-openssl', :platforms => :jruby
4
- gem 'rack', '~> 1.3.0'
5
- gem 'rake'
6
- gem 'yard'
7
-
8
- group :test do
9
- gem 'coveralls'
10
- gem 'hashie', '~> 2.0.5', :platforms => [:jruby_18, :ruby_18]
11
- gem 'json', '>= 1.8.1', :platforms => [:jruby_18, :jruby_18, :ruby_18, :ruby_19]
12
- gem 'mime-types', '~> 1.25', :platforms => [:jruby_18, :ruby_18]
13
- gem 'rack-test'
14
- gem 'rest-client', '~> 1.6.0', :platforms => [:jruby_18, :ruby_18]
15
- gem 'rspec', '~> 3.0'
16
- gem 'rubocop', '>= 0.25', :platforms => [:ruby_19, :ruby_20, :ruby_21]
17
- gem 'simplecov', '>= 0.9'
18
- end
19
-
20
- gemspec
data/Gemfile.rack-master DELETED
@@ -1,16 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'jruby-openssl', :platforms => :jruby
4
- gem 'rack', :git => 'https://github.com/rack/rack.git'
5
- gem 'rake'
6
- gem 'yard'
7
-
8
- group :test do
9
- gem 'coveralls'
10
- gem 'rack-test'
11
- gem 'rspec', '~> 3.0'
12
- gem 'rubocop', '>= 0.25'
13
- gem 'simplecov', '>= 0.9'
14
- end
15
-
16
- gemspec