oauth2 1.1.0 → 1.4.3

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.
Files changed (48) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +19 -0
  3. data/.jrubyrc +1 -0
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +80 -0
  6. data/.rubocop_rspec.yml +26 -0
  7. data/.rubocop_todo.yml +15 -0
  8. data/.ruby-version +1 -0
  9. data/.travis.yml +87 -0
  10. data/CHANGELOG.md +152 -0
  11. data/CODE_OF_CONDUCT.md +74 -0
  12. data/Gemfile +40 -0
  13. data/LICENSE +22 -0
  14. data/README.md +131 -22
  15. data/Rakefile +45 -0
  16. data/gemfiles/jruby_1.7.gemfile +11 -0
  17. data/gemfiles/jruby_9.0.gemfile +7 -0
  18. data/gemfiles/jruby_9.1.gemfile +3 -0
  19. data/gemfiles/jruby_9.2.gemfile +3 -0
  20. data/gemfiles/jruby_head.gemfile +3 -0
  21. data/gemfiles/ruby_1.9.gemfile +11 -0
  22. data/gemfiles/ruby_2.0.gemfile +6 -0
  23. data/gemfiles/ruby_2.1.gemfile +6 -0
  24. data/gemfiles/ruby_2.2.gemfile +3 -0
  25. data/gemfiles/ruby_2.3.gemfile +3 -0
  26. data/gemfiles/ruby_2.4.gemfile +3 -0
  27. data/gemfiles/ruby_2.5.gemfile +3 -0
  28. data/gemfiles/ruby_2.6.gemfile +9 -0
  29. data/gemfiles/ruby_2.7.gemfile +9 -0
  30. data/gemfiles/ruby_head.gemfile +9 -0
  31. data/gemfiles/truffleruby.gemfile +3 -0
  32. data/lib/oauth2/access_token.rb +6 -6
  33. data/lib/oauth2/authenticator.rb +68 -0
  34. data/lib/oauth2/client.rb +49 -14
  35. data/lib/oauth2/error.rb +21 -5
  36. data/lib/oauth2/mac_token.rb +3 -3
  37. data/lib/oauth2/response.rb +1 -1
  38. data/lib/oauth2/strategy/assertion.rb +13 -11
  39. data/lib/oauth2/strategy/auth_code.rb +2 -1
  40. data/lib/oauth2/strategy/base.rb +0 -7
  41. data/lib/oauth2/strategy/client_credentials.rb +2 -14
  42. data/lib/oauth2/strategy/implicit.rb +1 -1
  43. data/lib/oauth2/strategy/password.rb +2 -2
  44. data/lib/oauth2/version.rb +2 -2
  45. data/lib/oauth2.rb +1 -0
  46. data/oauth2.gemspec +37 -9
  47. metadata +212 -20
  48. data/LICENSE.md +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0e6df01671ac06be9840d38d64d3cc349e3f8a41
4
- data.tar.gz: 4ebfa842881a53f3c98cc407646614f5f8883cbc
2
+ SHA256:
3
+ metadata.gz: d268c85a1429a82d674a4acab6c89cd9b3b64044c2629ce321f5a0aba9f0f1e9
4
+ data.tar.gz: 9aa05cb486902e77eadcb801cfc36febb48707cda62ae76899398876cbe312d9
5
5
  SHA512:
6
- metadata.gz: fde60355bd37fd6ab71e9f103fae0d4fbb065b62c4070c95aef84842fb9cfce6a6125e75a0e78e98c87c54c32ccc72042a1c5cfae514d534799310ac5a82e0c6
7
- data.tar.gz: 6c358951c337a85275fe064a599e2fa03d92c4eeb3425d3ec2e51b857aa42cdcfd31ab1e1a2e77a2e9780c246970a0bcde4c3ae2e42c5775847e951faf45be28
6
+ metadata.gz: f9684210662ed503a26ba29ee7f0049afcd1ff3c185fe008c0b78cf3a5822dc10f2010b7d38ac7bde7eea479e3f7e3828b329c8bbecf54c3da3d2280be00dcd7
7
+ data.tar.gz: 8e9e3503c15112cada5c355e28f1ab5068b302768e5ad2fad4204e574712bccf0387edda4d410fb3fb67c25d3850b1e1d032a342e0ace183871efded3115061d
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *~
3
+ .bundle
4
+ .rvmrc
5
+ Gemfile.lock
6
+ coverage/*
7
+ log/*
8
+ measurement/*
9
+ pkg/*
10
+ rdoc/*
11
+
12
+ # rspec failure tracking
13
+ .rspec_status
14
+
15
+ # gemfiles for CI
16
+ /gemfiles/*.gemfile.lock
17
+
18
+ # CI bundle
19
+ /gemfiles/vendor/
data/.jrubyrc ADDED
@@ -0,0 +1 @@
1
+ debug.fullTrace=true
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --order random
data/.rubocop.yml ADDED
@@ -0,0 +1,80 @@
1
+ require: rubocop-rspec
2
+ inherit_from:
3
+ - .rubocop_todo.yml
4
+ - .rubocop_rspec.yml
5
+ AllCops:
6
+ DisplayCopNames: true # Display the name of the failing cops
7
+ TargetRubyVersion: 2.1
8
+ Exclude:
9
+ - 'gemfiles/vendor/**/*'
10
+ - 'vendor/**/*'
11
+ - '**/.irbrc'
12
+
13
+ Gemspec/RequiredRubyVersion:
14
+ Enabled: false
15
+
16
+ Metrics/BlockLength:
17
+ Enabled: false
18
+
19
+ Metrics/BlockNesting:
20
+ Max: 2
21
+
22
+ Metrics/LineLength:
23
+ Enabled: false
24
+
25
+ Metrics/MethodLength:
26
+ Max: 15
27
+
28
+ Metrics/ParameterLists:
29
+ Max: 4
30
+
31
+ Layout/AccessModifierIndentation:
32
+ EnforcedStyle: outdent
33
+
34
+ Layout/DotPosition:
35
+ EnforcedStyle: trailing
36
+
37
+ Layout/SpaceInsideHashLiteralBraces:
38
+ EnforcedStyle: no_space
39
+
40
+ Lint/UnusedBlockArgument:
41
+ Exclude:
42
+ - 'spec/**/*.rb'
43
+ - 'gemfiles/vendor/**/*'
44
+ - 'vendor/**/*'
45
+ - '**/.irbrc'
46
+
47
+ RSpec/DescribeClass:
48
+ Exclude:
49
+ - 'spec/examples/*'
50
+
51
+ RSpec/NestedGroups:
52
+ Enabled: false
53
+
54
+ Style/ClassVars:
55
+ Enabled: false
56
+
57
+ Style/CollectionMethods:
58
+ PreferredMethods:
59
+ map: 'collect'
60
+ reduce: 'inject'
61
+ find: 'detect'
62
+ find_all: 'select'
63
+
64
+ Style/Documentation:
65
+ Enabled: false
66
+
67
+ Style/DoubleNegation:
68
+ Enabled: false
69
+
70
+ Style/EmptyMethod:
71
+ EnforcedStyle: expanded
72
+
73
+ Style/Encoding:
74
+ Enabled: false
75
+
76
+ Style/TrailingCommaInArrayLiteral:
77
+ EnforcedStyleForMultiline: comma
78
+
79
+ Style/TrailingCommaInHashLiteral:
80
+ EnforcedStyleForMultiline: comma
@@ -0,0 +1,26 @@
1
+ RSpec/FilePath:
2
+ Enabled: false
3
+
4
+ RSpec/MultipleExpectations:
5
+ Enabled: false
6
+
7
+ RSpec/NamedSubject:
8
+ Enabled: false
9
+
10
+ RSpec/ExampleLength:
11
+ Enabled: false
12
+
13
+ RSpec/VerifiedDoubles:
14
+ Enabled: false
15
+
16
+ RSpec/MessageSpies:
17
+ Enabled: false
18
+
19
+ RSpec/InstanceVariable:
20
+ Enabled: false
21
+
22
+ RSpec/NestedGroups:
23
+ Enabled: false
24
+
25
+ RSpec/ExpectInHook:
26
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,15 @@
1
+ Style/HashSyntax:
2
+ EnforcedStyle: hash_rockets
3
+
4
+ Style/Lambda:
5
+ Enabled: false
6
+
7
+ Style/SymbolArray:
8
+ Enabled: false
9
+
10
+ Style/EachWithObject:
11
+ Enabled: false
12
+
13
+ # Once we drop Rubies that lack support for __dir__ we can turn this on.
14
+ Style/ExpandPathArguments:
15
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.0
data/.travis.yml ADDED
@@ -0,0 +1,87 @@
1
+ before_install:
2
+ # rubygems 2.7.8 and greater include bundler
3
+ # - Ruby 2.2, and under, get RubyGems ~> 2.7.10, (includes bundler 1.17.3)
4
+ # - Anything else, including Ruby 2.3, and above, gets RubyGems ~> 3, and update bundler to latest
5
+ # - NOTE ON JRUBY: identifies as RUBY_VERSION ~> 1.9, 2.0, 2.3, or 2.5.
6
+ # - NOTE ON TRUFFLERUBY: identifies as RUBY_VERSION ~> 2.6
7
+ - |
8
+ rv="$(ruby -e 'STDOUT.write RUBY_VERSION')"
9
+ echo "Discovered Ruby Version of =====> $rv"
10
+ if [ "$rv" \< "2.3" ]; then
11
+ gem update --system 2.7.10
12
+ elif [ "$rv" \< "2.4" ]; then
13
+ gem update --system 2.7.10 --no-document
14
+ elif [ "$rv" = "2.5.3" ]; then
15
+ # JRUBY 9.2 Identifies as 2.5.3, and it fails to update rubygems
16
+ gem install --no-document bundler "bundler:>=2.0"
17
+ else
18
+ gem update --system --no-document --conservative
19
+ gem install --no-document bundler "bundler:>=2.0"
20
+ fi
21
+
22
+ before_script:
23
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
24
+ - chmod +x ./cc-test-reporter
25
+ - ./cc-test-reporter before-build
26
+
27
+ after_script:
28
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
29
+
30
+ bundler_args: --no-deployment --jobs 3 --retry 3
31
+
32
+ cache: bundler
33
+
34
+ env:
35
+ global:
36
+ - JRUBY_OPTS="$JRUBY_OPTS -Xcli.debug=true --debug"
37
+ - CC_TEST_REPORTER_ID=29caf9cf27d27ae609c088feb9d4ba34460f7a39251f2e8615c9a16f3075530e
38
+
39
+ language: ruby
40
+
41
+ matrix:
42
+ allow_failures:
43
+ - rvm: jruby-head
44
+ - rvm: ruby-head
45
+ - rvm: truffleruby
46
+ - rvm: jruby-9.0
47
+ - rvm: jruby-9.1 # jruby-9.1 often fails to download, thus failing the build.
48
+ - rvm: jruby-9.2 # jruby-9.2 often fails to download, thus failing the build.
49
+ fast_finish: true
50
+ include:
51
+ # - rvm: jruby-1.7 # targets MRI v1.9
52
+ # gemfile: gemfiles/jruby_1.7.gemfile
53
+ - rvm: 1.9
54
+ gemfile: gemfiles/ruby_1.9.gemfile
55
+ - rvm: 2.0
56
+ gemfile: gemfiles/ruby_2.0.gemfile
57
+ - rvm: jruby-9.0 # targets MRI v2.0
58
+ gemfile: gemfiles/jruby_9.0.gemfile
59
+ - rvm: 2.1
60
+ gemfile: gemfiles/ruby_2.1.gemfile
61
+ # DEPRECATION WARNING
62
+ # oauth2 1.x series releases are the last to support Ruby versions above
63
+ # oauth2 2.x series releases will support Ruby versions below, and not above
64
+ - rvm: jruby-9.1 # targets MRI v2.3
65
+ gemfile: gemfiles/jruby_9.1.gemfile
66
+ - rvm: 2.2
67
+ gemfile: gemfiles/ruby_2.2.gemfile
68
+ - rvm: 2.3
69
+ gemfile: gemfiles/ruby_2.3.gemfile
70
+ - rvm: 2.4
71
+ gemfile: gemfiles/ruby_2.4.gemfile
72
+ - rvm: jruby-9.2 # targets MRI v2.5
73
+ gemfile: gemfiles/jruby_9.2.gemfile
74
+ - rvm: 2.5
75
+ gemfile: gemfiles/ruby_2.5.gemfile
76
+ - rvm: 2.6
77
+ gemfile: gemfiles/ruby_2.6.gemfile
78
+ - rvm: 2.7
79
+ gemfile: gemfiles/ruby_2.7.gemfile
80
+ - rvm: jruby-head
81
+ gemfile: gemfiles/jruby_head.gemfile
82
+ - rvm: ruby-head
83
+ gemfile: gemfiles/ruby_head.gemfile
84
+ - rvm: truffleruby
85
+ gemfile: gemfiles/truffleruby.gemfile
86
+
87
+ sudo: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,152 @@
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ ## [unreleased]
5
+
6
+ - no changes yet
7
+
8
+ ## [1.4.3] - 2020-01-29
9
+
10
+ - [#483](https://github.com/oauth-xx/oauth2/pull/483) - add project metadata to gemspec (@orien)
11
+ - [#495](https://github.com/oauth-xx/oauth2/pull/495) - support additional types of access token requests (@SteveyblamFreeagent, @thomcorley, @dgholz)
12
+ - Adds support for private_key_jwt and tls_client_auth
13
+
14
+ ## [1.4.2] - 2019-10-01
15
+
16
+ - [#478](https://github.com/oauth-xx/oauth2/pull/478) - support latest version of faraday & fix build (@pboling)
17
+ - officially support Ruby 2.6 and truffleruby
18
+
19
+ ## [1.4.1] - 2018-10-13
20
+
21
+ - [#417](https://github.com/oauth-xx/oauth2/pull/417) - update jwt dependency (@thewoolleyman)
22
+ - [#419](https://github.com/oauth-xx/oauth2/pull/419) - remove rubocop dependency (temporary, added back in [#423](https://github.com/oauth-xx/oauth2/pull/423)) (@pboling)
23
+ - [#418](https://github.com/oauth-xx/oauth2/pull/418) - update faraday dependency (@pboling)
24
+ - [#420](https://github.com/oauth-xx/oauth2/pull/420) - update [oauth2.gemspec](https://github.com/oauth-xx/oauth2/blob/1-4-stable/oauth2.gemspec) (@pboling)
25
+ - [#421](https://github.com/oauth-xx/oauth2/pull/421) - fix [CHANGELOG.md](https://github.com/oauth-xx/oauth2/blob/1-4-stable/CHANGELOG.md) for previous releases (@pboling)
26
+ - [#422](https://github.com/oauth-xx/oauth2/pull/422) - update [LICENSE](https://github.com/oauth-xx/oauth2/blob/1-4-stable/LICENSE) and [README.md](https://github.com/oauth-xx/oauth2/blob/1-4-stable/README.md) (@pboling)
27
+ - [#423](https://github.com/oauth-xx/oauth2/pull/423) - update [builds](https://travis-ci.org/oauth-xx/oauth2/builds), [Rakefile](https://github.com/oauth-xx/oauth2/blob/1-4-stable/Rakefile) (@pboling)
28
+ - officially document supported Rubies
29
+ * Ruby 1.9.3
30
+ * Ruby 2.0.0
31
+ * Ruby 2.1
32
+ * Ruby 2.2
33
+ * [JRuby 1.7][jruby-1.7] (targets MRI v1.9)
34
+ * [JRuby 9.0][jruby-9.0] (targets MRI v2.0)
35
+ * Ruby 2.3
36
+ * Ruby 2.4
37
+ * Ruby 2.5
38
+ * [JRuby 9.1][jruby-9.1] (targets MRI v2.3)
39
+ * [JRuby 9.2][jruby-9.2] (targets MRI v2.5)
40
+
41
+ [jruby-1.7]: https://www.jruby.org/2017/05/11/jruby-1-7-27.html
42
+ [jruby-9.0]: https://www.jruby.org/2016/01/26/jruby-9-0-5-0.html
43
+ [jruby-9.1]: https://www.jruby.org/2017/05/16/jruby-9-1-9-0.html
44
+ [jruby-9.2]: https://www.jruby.org/2018/05/24/jruby-9-2-0-0.html
45
+
46
+ ## [1.4.0] - 2017-06-09
47
+
48
+ - Drop Ruby 1.8.7 support (@sferik)
49
+ - Fix some RuboCop offenses (@sferik)
50
+ - _Dependency_: Remove Yardstick (@sferik)
51
+ - _Dependency_: Upgrade Faraday to 0.12 (@sferik)
52
+
53
+ ## [1.3.1] - 2017-03-03
54
+
55
+ - Add support for Ruby 2.4.0 (@pschambacher)
56
+ - _Dependency_: Upgrade Faraday to Faraday 0.11 (@mcfiredrill, @rhymes, @pschambacher)
57
+
58
+ ## [1.3.0] - 2016-12-28
59
+
60
+ - Add support for header-based authentication to the `Client` so it can be used across the library (@bjeanes)
61
+ - Default to header-based authentication when getting a token from an authorisation code (@maletor)
62
+ - **Breaking**: Allow an `auth_scheme` (`:basic_auth` or `:request_body`) to be set on the client, defaulting to `:request_body` to maintain backwards compatibility (@maletor, @bjeanes)
63
+ - Handle `redirect_uri` according to the OAuth 2 spec, so it is passed on redirect and at the point of token exchange (@bjeanes)
64
+ - Refactor handling of encoding of error responses (@urkle)
65
+ - Avoid instantiating an `Error` if there is no error to raise (@urkle)
66
+ - Add support for Faraday 0.10 (@rhymes)
67
+
68
+ ## [1.2.0] - 2016-07-01
69
+
70
+ - Properly handle encoding of error responses (so we don't blow up, for example, when Google's response includes a ∞) (@Motoshi-Nishihira)
71
+ - Make a copy of the options hash in `AccessToken#from_hash` to avoid accidental mutations (@Linuus)
72
+ - Use `raise` rather than `fail` to throw exceptions (@sferik)
73
+
74
+ ## [1.1.0] - 2016-01-30
75
+
76
+ - Various refactors (eliminating `Hash#merge!` usage in `AccessToken#refresh!`, use `yield` instead of `#call`, freezing mutable objects in constants, replacing constants with class variables) (@sferik)
77
+ - Add support for Rack 2, and bump various other dependencies (@sferik)
78
+
79
+ ## [1.0.0] - 2014-07-09
80
+
81
+ ### Added
82
+ - Add an implementation of the MAC token spec.
83
+
84
+ ### Fixed
85
+ - Fix Base64.strict_encode64 incompatibility with Ruby 1.8.7.
86
+
87
+ ## [0.5.0] - 2011-07-29
88
+
89
+ ### Changed
90
+ - [breaking] `oauth_token` renamed to `oauth_bearer`.
91
+ - [breaking] `authorize_path` Client option renamed to `authorize_url`.
92
+ - [breaking] `access_token_path` Client option renamed to `token_url`.
93
+ - [breaking] `access_token_method` Client option renamed to `token_method`.
94
+ - [breaking] `web_server` renamed to `auth_code`.
95
+
96
+ ## [0.4.1] - 2011-04-20
97
+
98
+ ## [0.4.0] - 2011-04-20
99
+
100
+ ## [0.3.0] - 2011-04-08
101
+
102
+ ## [0.2.0] - 2011-04-01
103
+
104
+ ## [0.1.1] - 2011-01-12
105
+
106
+ ## [0.1.0] - 2010-10-13
107
+
108
+ ## [0.0.13] + [0.0.12] + [0.0.11] - 2010-08-17
109
+
110
+ ## [0.0.10] - 2010-06-19
111
+
112
+ ## [0.0.9] - 2010-06-18
113
+
114
+ ## [0.0.8] + [0.0.7] - 2010-04-27
115
+
116
+ ## [0.0.6] - 2010-04-25
117
+
118
+ ## [0.0.5] - 2010-04-23
119
+
120
+ ## [0.0.4] + [0.0.3] + [0.0.2] + [0.0.1] - 2010-04-22
121
+
122
+
123
+ [0.0.1]: https://github.com/oauth-xx/oauth2/compare/311d9f4...v0.0.1
124
+ [0.0.2]: https://github.com/oauth-xx/oauth2/compare/v0.0.1...v0.0.2
125
+ [0.0.3]: https://github.com/oauth-xx/oauth2/compare/v0.0.2...v0.0.3
126
+ [0.0.4]: https://github.com/oauth-xx/oauth2/compare/v0.0.3...v0.0.4
127
+ [0.0.5]: https://github.com/oauth-xx/oauth2/compare/v0.0.4...v0.0.5
128
+ [0.0.6]: https://github.com/oauth-xx/oauth2/compare/v0.0.5...v0.0.6
129
+ [0.0.7]: https://github.com/oauth-xx/oauth2/compare/v0.0.6...v0.0.7
130
+ [0.0.8]: https://github.com/oauth-xx/oauth2/compare/v0.0.7...v0.0.8
131
+ [0.0.9]: https://github.com/oauth-xx/oauth2/compare/v0.0.8...v0.0.9
132
+ [0.0.10]: https://github.com/oauth-xx/oauth2/compare/v0.0.9...v0.0.10
133
+ [0.0.11]: https://github.com/oauth-xx/oauth2/compare/v0.0.10...v0.0.11
134
+ [0.0.12]: https://github.com/oauth-xx/oauth2/compare/v0.0.11...v0.0.12
135
+ [0.0.13]: https://github.com/oauth-xx/oauth2/compare/v0.0.12...v0.0.13
136
+ [0.1.0]: https://github.com/oauth-xx/oauth2/compare/v0.0.13...v0.1.0
137
+ [0.1.1]: https://github.com/oauth-xx/oauth2/compare/v0.1.0...v0.1.1
138
+ [0.2.0]: https://github.com/oauth-xx/oauth2/compare/v0.1.1...v0.2.0
139
+ [0.3.0]: https://github.com/oauth-xx/oauth2/compare/v0.2.0...v0.3.0
140
+ [0.4.0]: https://github.com/oauth-xx/oauth2/compare/v0.3.0...v0.4.0
141
+ [0.4.1]: https://github.com/oauth-xx/oauth2/compare/v0.4.0...v0.4.1
142
+ [0.5.0]: https://github.com/oauth-xx/oauth2/compare/v0.4.1...v0.5.0
143
+ [1.0.0]: https://github.com/oauth-xx/oauth2/compare/v0.9.4...v1.0.0
144
+ [1.1.0]: https://github.com/oauth-xx/oauth2/compare/v1.0.0...v1.1.0
145
+ [1.2.0]: https://github.com/oauth-xx/oauth2/compare/v1.1.0...v1.2.0
146
+ [1.3.0]: https://github.com/oauth-xx/oauth2/compare/v1.2.0...v1.3.0
147
+ [1.3.1]: https://github.com/oauth-xx/oauth2/compare/v1.3.0...v1.3.1
148
+ [1.4.0]: https://github.com/oauth-xx/oauth2/compare/v1.3.1...v1.4.0
149
+ [1.4.1]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...v1.4.1
150
+ [1.4.2]: https://github.com/oauth-xx/oauth2/compare/v1.4.1...v1.4.2
151
+ [1.4.3]: https://github.com/oauth-xx/oauth2/compare/v1.4.2...v1.4.3
152
+ [unreleased]: https://github.com/oauth-xx/oauth2/compare/v1.4.1...HEAD
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at peter.boling@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,40 @@
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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
4
+ Copyright (c) 2017 - 2018 oauth-xx organization, https://github.com/oauth-xx
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.