oauth2 1.4.4 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -2
  3. data/CODE_OF_CONDUCT.md +105 -46
  4. data/README.md +8 -3
  5. data/lib/oauth2/access_token.rb +8 -7
  6. data/lib/oauth2/authenticator.rb +1 -1
  7. data/lib/oauth2/client.rb +60 -14
  8. data/lib/oauth2/mac_token.rb +10 -2
  9. data/lib/oauth2/response.rb +5 -3
  10. data/lib/oauth2/strategy/assertion.rb +3 -3
  11. data/lib/oauth2/strategy/password.rb +2 -2
  12. data/lib/oauth2/version.rb +9 -3
  13. data/spec/helper.rb +37 -0
  14. data/spec/oauth2/access_token_spec.rb +216 -0
  15. data/spec/oauth2/authenticator_spec.rb +84 -0
  16. data/spec/oauth2/client_spec.rb +506 -0
  17. data/spec/oauth2/mac_token_spec.rb +117 -0
  18. data/spec/oauth2/response_spec.rb +90 -0
  19. data/spec/oauth2/strategy/assertion_spec.rb +58 -0
  20. data/spec/oauth2/strategy/auth_code_spec.rb +107 -0
  21. data/spec/oauth2/strategy/base_spec.rb +5 -0
  22. data/spec/oauth2/strategy/client_credentials_spec.rb +69 -0
  23. data/spec/oauth2/strategy/implicit_spec.rb +26 -0
  24. data/spec/oauth2/strategy/password_spec.rb +55 -0
  25. data/spec/oauth2/version_spec.rb +23 -0
  26. metadata +38 -41
  27. data/.document +0 -5
  28. data/.gitignore +0 -19
  29. data/.jrubyrc +0 -1
  30. data/.rspec +0 -2
  31. data/.rubocop.yml +0 -80
  32. data/.rubocop_rspec.yml +0 -26
  33. data/.rubocop_todo.yml +0 -15
  34. data/.ruby-version +0 -1
  35. data/.travis.yml +0 -87
  36. data/CONTRIBUTING.md +0 -18
  37. data/Gemfile +0 -40
  38. data/Rakefile +0 -45
  39. data/gemfiles/jruby_1.7.gemfile +0 -11
  40. data/gemfiles/jruby_9.0.gemfile +0 -7
  41. data/gemfiles/jruby_9.1.gemfile +0 -3
  42. data/gemfiles/jruby_9.2.gemfile +0 -3
  43. data/gemfiles/jruby_head.gemfile +0 -3
  44. data/gemfiles/ruby_1.9.gemfile +0 -11
  45. data/gemfiles/ruby_2.0.gemfile +0 -6
  46. data/gemfiles/ruby_2.1.gemfile +0 -6
  47. data/gemfiles/ruby_2.2.gemfile +0 -3
  48. data/gemfiles/ruby_2.3.gemfile +0 -3
  49. data/gemfiles/ruby_2.4.gemfile +0 -3
  50. data/gemfiles/ruby_2.5.gemfile +0 -3
  51. data/gemfiles/ruby_2.6.gemfile +0 -9
  52. data/gemfiles/ruby_2.7.gemfile +0 -9
  53. data/gemfiles/ruby_head.gemfile +0 -9
  54. data/gemfiles/truffleruby.gemfile +0 -3
  55. data/oauth2.gemspec +0 -52
data/CONTRIBUTING.md DELETED
@@ -1,18 +0,0 @@
1
- ## Submitting a Pull Request
2
- 1. [Fork the repository.][fork]
3
- 2. [Create a topic branch.][branch]
4
- 3. Add specs for your unimplemented feature or bug fix.
5
- 4. Run `bundle exec rake spec`. If your specs pass, return to step 3.
6
- 5. Implement your feature or bug fix.
7
- 6. Run `bundle exec rake`. If your specs fail, return to step 5.
8
- 7. Run `open coverage/index.html`. If your changes are not completely covered
9
- by your tests, return to step 3.
10
- 8. Add documentation for your feature or bug fix.
11
- 9. Run `bundle exec rake verify_measurements`. If your changes are not 100%
12
- documented, go back to step 8.
13
- 10. Commit and push your changes.
14
- 11. [Submit a pull request.][pr]
15
-
16
- [fork]: http://help.github.com/fork-a-repo/
17
- [branch]: http://learn.github.com/p/branching.html
18
- [pr]: http://help.github.com/send-pull-requests/
data/Gemfile DELETED
@@ -1,40 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
-
5
- gem 'faraday', ['>= 0.8', '< 2.0'], :platforms => [:jruby_18, :ruby_18]
6
- gem 'jwt', '< 1.5.2', :platforms => [:jruby_18, :ruby_18]
7
- gem 'rake', '< 11.0'
8
- gem 'rdoc', '~> 4.2.2'
9
-
10
- group :test do
11
- ruby_version = Gem::Version.new(RUBY_VERSION)
12
- if ruby_version >= Gem::Version.new('2.1')
13
- # TODO: Upgrade to >= 0.59 when we drop Rubies below 2.2
14
- # Error: Unsupported Ruby version 2.1 found in `TargetRubyVersion` parameter (in .rubocop.yml). 2.1-compatible analysis was dropped after version 0.58.
15
- # Supported versions: 2.2, 2.3, 2.4, 2.5
16
- gem 'rubocop', '~> 0.57.0'
17
- gem 'rubocop-rspec', '~> 1.27.0' # last version that can use rubocop < 0.58
18
- end
19
- gem 'pry', '~> 0.11' if ruby_version >= Gem::Version.new('2.0')
20
-
21
- gem 'addressable', '~> 2.3.8'
22
- gem 'backports'
23
- gem 'coveralls'
24
- gem 'rack', '~> 1.2', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19, :ruby_20, :ruby_21]
25
- gem 'rspec', '>= 3'
26
- gem 'simplecov', '>= 0.9'
27
-
28
- platforms :jruby_18, :ruby_18 do
29
- gem 'mime-types', '~> 1.25'
30
- gem 'rest-client', '~> 1.6.0'
31
- end
32
-
33
- platforms :ruby_18, :ruby_19 do
34
- gem 'json', '< 2.0'
35
- gem 'term-ansicolor', '< 1.4.0'
36
- gem 'tins', '< 1.7'
37
- end
38
- end
39
-
40
- gemspec
data/Rakefile DELETED
@@ -1,45 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # !/usr/bin/env rake
4
-
5
- require 'bundler/gem_tasks'
6
-
7
- begin
8
- require 'wwtd/tasks'
9
- rescue LoadError
10
- puts 'failed to load wwtd'
11
- end
12
-
13
- begin
14
- require 'rspec/core/rake_task'
15
- RSpec::Core::RakeTask.new(:spec)
16
- rescue LoadError
17
- task :spec do
18
- warn 'rspec is disabled'
19
- end
20
- end
21
- task :test => :spec
22
-
23
- begin
24
- require 'rubocop/rake_task'
25
- RuboCop::RakeTask.new do |task|
26
- task.options = ['-D'] # Display the name of the failing cops
27
- end
28
- rescue LoadError
29
- task :rubocop do
30
- warn 'RuboCop is disabled'
31
- end
32
- end
33
-
34
- namespace :doc do
35
- require 'rdoc/task'
36
- require File.expand_path('../lib/oauth2/version', __FILE__)
37
- RDoc::Task.new do |rdoc|
38
- rdoc.rdoc_dir = 'rdoc'
39
- rdoc.title = "oauth2 #{OAuth2::Version}"
40
- rdoc.main = 'README.md'
41
- rdoc.rdoc_files.include('README.md', 'LICENSE.md', 'lib/**/*.rb')
42
- end
43
- end
44
-
45
- task :default => [:test, :rubocop]
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'faraday', '~> 0.15.4'
4
-
5
- gem 'json', '< 2.0'
6
- gem 'rack', '~> 1.2'
7
- gem 'rake', [">= 10.0", "< 12"]
8
- gem 'term-ansicolor', '< 1.4.0'
9
- gem 'tins', '< 1.7'
10
-
11
- gemspec :path => '../'
@@ -1,7 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'faraday', '~> 0.15.4'
4
-
5
- gem 'rake', [">= 10.0", "< 12"]
6
-
7
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'faraday', '~> 0.15.4'
4
-
5
- gem 'json', '< 2.0'
6
- gem 'rack', '~> 1.2'
7
- gem 'rake', [">= 10.0", "< 12"]
8
- gem 'term-ansicolor', '< 1.4.0'
9
- gem 'tins', '< 1.7'
10
-
11
- gemspec :path => '../'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'faraday', '~> 0.15.4'
4
- gem 'rack', '~> 1.2'
5
-
6
- gemspec :path => '../'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'faraday', '~> 0.15.4'
4
- gem 'rack', '~> 1.2'
5
-
6
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- group :development do
4
- gem 'pry'
5
- gem 'byebug'
6
- gem 'pry-byebug'
7
- end
8
-
9
- gemspec :path => '../'
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- group :development do
4
- gem 'pry'
5
- gem 'byebug'
6
- gem 'pry-byebug'
7
- end
8
-
9
- gemspec :path => '../'
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- group :development do
4
- gem 'pry'
5
- gem 'byebug'
6
- gem 'pry-byebug'
7
- end
8
-
9
- gemspec :path => '../'
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
data/oauth2.gemspec DELETED
@@ -1,52 +0,0 @@
1
- # coding: utf-8
2
-
3
- lib = File.expand_path('../lib', __FILE__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'oauth2/version'
6
-
7
- Gem::Specification.new do |spec|
8
- spec.add_dependency 'faraday', ['>= 0.8', '< 2.0']
9
- spec.add_dependency 'jwt', ['>= 1.0', '< 3.0']
10
- spec.add_dependency 'multi_json', '~> 1.3'
11
- spec.add_dependency 'multi_xml', '~> 0.5'
12
- spec.add_dependency 'rack', ['>= 1.2', '< 3']
13
-
14
- spec.authors = ['Peter Boling', 'Michael Bleigh', 'Erik Michaels-Ober']
15
- spec.description = 'A Ruby wrapper for the OAuth 2.0 protocol built with a similar style to the original OAuth spec.'
16
- spec.email = ['peter.boling@gmail.com']
17
- spec.homepage = 'https://github.com/oauth-xx/oauth2'
18
- spec.licenses = %w[MIT]
19
- spec.name = 'oauth2'
20
- spec.required_ruby_version = '>= 1.9.0'
21
- spec.required_rubygems_version = '>= 1.3.5'
22
- spec.summary = 'A Ruby wrapper for the OAuth 2.0 protocol.'
23
- spec.version = OAuth2::Version
24
-
25
- spec.metadata = {
26
- 'bug_tracker_uri' => 'https://github.com/oauth-xx/oauth2/issues',
27
- 'changelog_uri' => "https://github.com/oauth-xx/oauth2/blob/v#{spec.version}/CHANGELOG.md",
28
- 'documentation_uri' => "https://www.rubydoc.info/gems/oauth2/#{spec.version}",
29
- 'source_code_uri' => "https://github.com/oauth-xx/oauth2/tree/v#{spec.version}",
30
- 'wiki_uri' => 'https://github.com/oauth-xx/oauth2/wiki'
31
- }
32
-
33
- spec.require_paths = %w[lib]
34
- spec.bindir = 'exe'
35
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
37
- f.match(%r{^(bin|test|spec|features)/})
38
- end
39
-
40
- spec.add_development_dependency 'addressable', '~> 2.3'
41
- spec.add_development_dependency 'backports', '~> 3.11'
42
- spec.add_development_dependency 'bundler', '>= 1.16'
43
- spec.add_development_dependency 'coveralls', '~> 0.8'
44
- spec.add_development_dependency 'rake', '~> 12.3'
45
- spec.add_development_dependency 'rdoc', ['>= 5.0', '< 7']
46
- spec.add_development_dependency 'rspec', '~> 3.0'
47
- spec.add_development_dependency 'rspec-stubbed_env'
48
- spec.add_development_dependency 'rspec-pending_for'
49
- spec.add_development_dependency 'rspec-block_is_expected'
50
- spec.add_development_dependency 'silent_stream'
51
- spec.add_development_dependency 'wwtd'
52
- end