oauth2 1.4.4 → 1.4.5
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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/style.yml +37 -0
- data/.github/workflows/test.yml +58 -0
- data/.rspec +2 -0
- data/.rubocop.yml +41 -9
- data/.rubocop_todo.yml +108 -10
- data/.travis.yml +2 -14
- data/CHANGELOG.md +5 -2
- data/CODE_OF_CONDUCT.md +105 -46
- data/Gemfile +35 -14
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/gemfiles/jruby_1.7.gemfile +1 -1
- data/gemfiles/jruby_9.0.gemfile +1 -1
- data/gemfiles/ruby_1.9.gemfile +1 -1
- data/gemfiles/ruby_head.gemfile +1 -1
- data/lib/oauth2/access_token.rb +6 -3
- data/lib/oauth2/authenticator.rb +1 -1
- data/lib/oauth2/client.rb +60 -14
- data/lib/oauth2/mac_token.rb +10 -2
- data/lib/oauth2/response.rb +5 -3
- data/lib/oauth2/strategy/assertion.rb +3 -3
- data/lib/oauth2/strategy/password.rb +2 -2
- data/lib/oauth2/version.rb +2 -1
- data/maintenance-branch +1 -0
- data/oauth2.gemspec +7 -7
- metadata +15 -18
- data/gemfiles/ruby_2.1.gemfile +0 -6
- data/gemfiles/ruby_2.2.gemfile +0 -3
- data/gemfiles/ruby_2.3.gemfile +0 -3
- data/gemfiles/ruby_2.4.gemfile +0 -3
- data/gemfiles/ruby_2.5.gemfile +0 -3
- data/gemfiles/ruby_2.6.gemfile +0 -9
- data/gemfiles/ruby_2.7.gemfile +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a85bca5fd51e149c80b5403207615e23040773582d3e2ae0fc2c44b83d49e866
|
4
|
+
data.tar.gz: 8022e428b4e48a88bbc84ec5855bce39d3b7b37ffe8a987df161103402b08585
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 810d0073495d3e5f05149b41257e02fbfd2ce09294f082dd69ddba67cc7c523d268f8163232ec6da783f05adf3f0e2876980699be3e6de58732cb1d8d988be20
|
7
|
+
data.tar.gz: d70c9a0303ae519eaa2b0db6af9e8dc56380263fbb30fce15a7ec9ff26ccc467de99a91265bc57d8bdce9bf2ade650312804e161b598e49c29ee81d2f2a3678f
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Code Style Checks
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- 'main'
|
7
|
+
- 'master'
|
8
|
+
- '*-maintenance'
|
9
|
+
- '*-dev'
|
10
|
+
tags:
|
11
|
+
- '!*' # Do not execute on tags
|
12
|
+
pull_request:
|
13
|
+
branches:
|
14
|
+
- '*'
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
rubocop:
|
18
|
+
name: Rubocop
|
19
|
+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
|
20
|
+
strategy:
|
21
|
+
fail-fast: false
|
22
|
+
matrix:
|
23
|
+
ruby:
|
24
|
+
- 2.7
|
25
|
+
runs-on: ubuntu-20.04
|
26
|
+
steps:
|
27
|
+
- name: Checkout
|
28
|
+
uses: actions/checkout@v2
|
29
|
+
- name: Setup Ruby
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby }}
|
33
|
+
bundler-cache: true
|
34
|
+
- name: Install dependencies
|
35
|
+
run: bundle install --jobs 3 --retry 3
|
36
|
+
- name: Run Rubocop
|
37
|
+
run: bundle exec rubocop -DESP
|
@@ -0,0 +1,58 @@
|
|
1
|
+
name: Unit Tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- 'main'
|
7
|
+
- 'master'
|
8
|
+
- '*-maintenance'
|
9
|
+
- '*-dev'
|
10
|
+
tags:
|
11
|
+
- '!*' # Do not execute on tags
|
12
|
+
pull_request:
|
13
|
+
branches:
|
14
|
+
- '*'
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
|
19
|
+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
|
20
|
+
strategy:
|
21
|
+
fail-fast: false
|
22
|
+
matrix:
|
23
|
+
ruby:
|
24
|
+
- 3.0.0
|
25
|
+
- 2.7
|
26
|
+
- 2.6
|
27
|
+
- 2.5
|
28
|
+
- 2.4
|
29
|
+
- 2.3
|
30
|
+
- 2.2
|
31
|
+
- 2.1
|
32
|
+
runs-on: ubuntu-20.04
|
33
|
+
continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }}
|
34
|
+
steps:
|
35
|
+
- uses: amancevice/setup-code-climate@v0
|
36
|
+
name: CodeClimate Install
|
37
|
+
if: matrix.ruby == '2.7' && github.event_name != 'pull_request'
|
38
|
+
with:
|
39
|
+
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
|
40
|
+
- uses: actions/checkout@v2
|
41
|
+
- name: Setup Ruby
|
42
|
+
uses: ruby/setup-ruby@v1
|
43
|
+
with:
|
44
|
+
bundler: ${{ matrix.bundler || 2 }}
|
45
|
+
bundler-cache: true
|
46
|
+
ruby-version: ${{ matrix.ruby }}
|
47
|
+
- name: Install dependencies
|
48
|
+
run: bundle install --jobs 3 --retry 3 --binstubs --standalone
|
49
|
+
- name: CodeClimate Pre-build Notification
|
50
|
+
run: cc-test-reporter before-build
|
51
|
+
if: matrix.ruby == '2.7' && github.event_name != 'pull_request'
|
52
|
+
continue-on-error: ${{ matrix.allow_failures != 'false' }}
|
53
|
+
- name: Run tests
|
54
|
+
run: bundle exec rake test
|
55
|
+
- name: CodeClimate Post-build Notification
|
56
|
+
run: cc-test-reporter after-build
|
57
|
+
if: matrix.ruby == '2.7' && github.event_name != 'pull_request' && always()
|
58
|
+
continue-on-error: ${{ matrix.allow_failures != 'false' }}
|
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,30 +1,42 @@
|
|
1
|
-
require: rubocop-rspec
|
2
1
|
inherit_from:
|
3
2
|
- .rubocop_todo.yml
|
4
3
|
- .rubocop_rspec.yml
|
4
|
+
|
5
|
+
require:
|
6
|
+
- 'rubocop-md'
|
7
|
+
- 'rubocop-packaging'
|
8
|
+
- 'rubocop-performance'
|
9
|
+
- 'rubocop-rake'
|
10
|
+
- 'rubocop-rspec'
|
11
|
+
|
5
12
|
AllCops:
|
13
|
+
NewCops: enable
|
6
14
|
DisplayCopNames: true # Display the name of the failing cops
|
7
|
-
TargetRubyVersion: 2.1
|
8
15
|
Exclude:
|
9
16
|
- 'gemfiles/vendor/**/*'
|
10
17
|
- 'vendor/**/*'
|
11
18
|
- '**/.irbrc'
|
12
19
|
|
13
|
-
Gemspec/RequiredRubyVersion:
|
14
|
-
Enabled: false
|
15
|
-
|
16
20
|
Metrics/BlockLength:
|
21
|
+
IgnoredMethods:
|
22
|
+
- context
|
23
|
+
- describe
|
24
|
+
- it
|
25
|
+
- shared_context
|
26
|
+
- shared_examples
|
27
|
+
- shared_examples_for
|
28
|
+
- namespace
|
29
|
+
- draw
|
30
|
+
|
31
|
+
Gemspec/RequiredRubyVersion:
|
17
32
|
Enabled: false
|
18
33
|
|
19
34
|
Metrics/BlockNesting:
|
20
35
|
Max: 2
|
21
36
|
|
22
|
-
|
37
|
+
Layout/LineLength:
|
23
38
|
Enabled: false
|
24
39
|
|
25
|
-
Metrics/MethodLength:
|
26
|
-
Max: 15
|
27
|
-
|
28
40
|
Metrics/ParameterLists:
|
29
41
|
Max: 4
|
30
42
|
|
@@ -78,3 +90,23 @@ Style/TrailingCommaInArrayLiteral:
|
|
78
90
|
|
79
91
|
Style/TrailingCommaInHashLiteral:
|
80
92
|
EnforcedStyleForMultiline: comma
|
93
|
+
|
94
|
+
Style/HashSyntax:
|
95
|
+
EnforcedStyle: hash_rockets
|
96
|
+
|
97
|
+
Style/Lambda:
|
98
|
+
Enabled: false
|
99
|
+
|
100
|
+
Style/SymbolArray:
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
Style/EachWithObject:
|
104
|
+
Enabled: false
|
105
|
+
|
106
|
+
# Once we drop Rubies that lack support for __dir__ we can turn this on.
|
107
|
+
Style/ExpandPathArguments:
|
108
|
+
Enabled: false
|
109
|
+
|
110
|
+
# On Ruby 1.9 array.to_h isn't available, needs to be Hash[array]
|
111
|
+
Style/HashConversion:
|
112
|
+
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,15 +1,113 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2021-03-18 18:59:52 UTC using RuboCop version 1.11.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
3
8
|
|
4
|
-
|
5
|
-
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: AllowedMethods.
|
11
|
+
# AllowedMethods: enums
|
12
|
+
Lint/ConstantDefinitionInBlock:
|
13
|
+
Exclude:
|
14
|
+
- 'spec/oauth2/client_spec.rb'
|
6
15
|
|
7
|
-
|
8
|
-
|
16
|
+
# Offense count: 1
|
17
|
+
Lint/UselessAssignment:
|
18
|
+
Exclude:
|
19
|
+
- '**/*.md'
|
20
|
+
- '**/*.markdown'
|
21
|
+
- 'spec/oauth2/client_spec.rb'
|
9
22
|
|
10
|
-
|
11
|
-
|
23
|
+
# Offense count: 1
|
24
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
25
|
+
# IgnoredMethods: refine
|
26
|
+
Metrics/BlockLength:
|
27
|
+
Max: 27
|
28
|
+
|
29
|
+
# Offense count: 4
|
30
|
+
# Configuration parameters: IgnoredMethods.
|
31
|
+
Metrics/CyclomaticComplexity:
|
32
|
+
Max: 11
|
33
|
+
|
34
|
+
# Offense count: 1
|
35
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
36
|
+
Metrics/MethodLength:
|
37
|
+
Max: 18
|
38
|
+
|
39
|
+
# Offense count: 3
|
40
|
+
# Configuration parameters: IgnoredMethods.
|
41
|
+
Metrics/PerceivedComplexity:
|
42
|
+
Max: 11
|
43
|
+
|
44
|
+
# Offense count: 14
|
45
|
+
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
|
46
|
+
# SupportedStyles: snake_case, normalcase, non_integer
|
47
|
+
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
|
48
|
+
Naming/VariableNumber:
|
49
|
+
Exclude:
|
50
|
+
- 'Gemfile'
|
51
|
+
|
52
|
+
# Offense count: 1
|
53
|
+
Packaging/GemspecGit:
|
54
|
+
Exclude:
|
55
|
+
- 'oauth2.gemspec'
|
12
56
|
|
13
|
-
#
|
14
|
-
|
57
|
+
# Offense count: 2
|
58
|
+
# Configuration parameters: MinSize.
|
59
|
+
Performance/CollectionLiteralInLoop:
|
60
|
+
Exclude:
|
61
|
+
- 'spec/oauth2/strategy/auth_code_spec.rb'
|
62
|
+
- 'spec/oauth2/strategy/client_credentials_spec.rb'
|
63
|
+
|
64
|
+
# Offense count: 7
|
65
|
+
# Configuration parameters: Prefixes.
|
66
|
+
# Prefixes: when, with, without
|
67
|
+
RSpec/ContextWording:
|
68
|
+
Exclude:
|
69
|
+
- 'spec/oauth2/access_token_spec.rb'
|
70
|
+
- 'spec/oauth2/authenticator_spec.rb'
|
71
|
+
- 'spec/oauth2/client_spec.rb'
|
72
|
+
|
73
|
+
# Offense count: 1
|
74
|
+
RSpec/LeakyConstantDeclaration:
|
75
|
+
Exclude:
|
76
|
+
- 'spec/oauth2/client_spec.rb'
|
77
|
+
|
78
|
+
# Offense count: 8
|
79
|
+
# Configuration parameters: AllowSubject.
|
80
|
+
RSpec/MultipleMemoizedHelpers:
|
81
|
+
Max: 6
|
82
|
+
|
83
|
+
# Offense count: 1
|
84
|
+
Rake/Desc:
|
85
|
+
Exclude:
|
86
|
+
- 'Rakefile'
|
87
|
+
|
88
|
+
# Offense count: 40
|
89
|
+
# Cop supports --auto-correct.
|
90
|
+
# Configuration parameters: EnforcedStyle.
|
91
|
+
# SupportedStyles: always, always_true, never
|
92
|
+
Style/FrozenStringLiteralComment:
|
15
93
|
Enabled: false
|
94
|
+
|
95
|
+
# Offense count: 1
|
96
|
+
Style/MixinUsage:
|
97
|
+
Exclude:
|
98
|
+
- 'spec/helper.rb'
|
99
|
+
|
100
|
+
# Offense count: 1
|
101
|
+
# Cop supports --auto-correct.
|
102
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
103
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
104
|
+
Style/SafeNavigation:
|
105
|
+
Exclude:
|
106
|
+
- 'lib/oauth2/error.rb'
|
107
|
+
|
108
|
+
# Offense count: 3
|
109
|
+
# Cop supports --auto-correct.
|
110
|
+
Style/StringConcatenation:
|
111
|
+
Exclude:
|
112
|
+
- 'lib/oauth2/authenticator.rb'
|
113
|
+
- 'spec/oauth2/authenticator_spec.rb'
|
data/.travis.yml
CHANGED
@@ -56,27 +56,15 @@ matrix:
|
|
56
56
|
gemfile: gemfiles/ruby_2.0.gemfile
|
57
57
|
- rvm: jruby-9.0 # targets MRI v2.0
|
58
58
|
gemfile: gemfiles/jruby_9.0.gemfile
|
59
|
-
- rvm: 2.1
|
60
|
-
gemfile: gemfiles/ruby_2.1.gemfile
|
61
59
|
# DEPRECATION WARNING
|
60
|
+
# NOTE: Specs for Ruby 2.1 are now running with Github Actions
|
62
61
|
# oauth2 1.x series releases are the last to support Ruby versions above
|
63
62
|
# oauth2 2.x series releases will support Ruby versions below, and not above
|
63
|
+
# NOTE: Specs for Ruby 2.2, 2.3, 2.4, 2.5, 2.6, 2.7 & 3.0 are now running with Github Actions
|
64
64
|
- rvm: jruby-9.1 # targets MRI v2.3
|
65
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
66
|
- rvm: jruby-9.2 # targets MRI v2.5
|
73
67
|
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
68
|
- rvm: jruby-head
|
81
69
|
gemfile: gemfiles/jruby_head.gemfile
|
82
70
|
- rvm: ruby-head
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
##
|
4
|
+
## unreleased
|
5
5
|
|
6
|
-
|
6
|
+
## [1.4.5] - 2020-03-18
|
7
|
+
|
8
|
+
- [#535](https://github.com/oauth-xx/oauth2/pull/535) - Compatibility with range of supported Ruby OpenSSL versions, Rubocop updates, Github Actions (@pboling)
|
9
|
+
- [#518](https://github.com/oauth-xx/oauth2/pull/518) - Add extract_access_token option to OAuth2::Client (@jonspalmer)
|
7
10
|
|
8
11
|
## [1.4.4] - 2020-02-12
|
9
12
|
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,74 +1,133 @@
|
|
1
|
+
|
1
2
|
# Contributor Covenant Code of Conduct
|
2
3
|
|
3
4
|
## Our Pledge
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
10
|
-
orientation.
|
6
|
+
We as members, contributors, and leaders pledge to make participation in our
|
7
|
+
community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
9
|
+
identity and expression, level of experience, education, socio-economic status,
|
10
|
+
nationality, personal appearance, race, religion, or sexual identity
|
11
|
+
and orientation.
|
12
|
+
|
13
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
14
|
+
diverse, inclusive, and healthy community.
|
11
15
|
|
12
16
|
## Our Standards
|
13
17
|
|
14
|
-
Examples of behavior that contributes to
|
15
|
-
include:
|
18
|
+
Examples of behavior that contributes to a positive environment for our
|
19
|
+
community include:
|
16
20
|
|
17
|
-
*
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
*
|
20
|
-
*
|
21
|
-
|
21
|
+
* Demonstrating empathy and kindness toward other people
|
22
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
23
|
+
* Giving and gracefully accepting constructive feedback
|
24
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
25
|
+
and learning from the experience
|
26
|
+
* Focusing on what is best not just for us as individuals, but for the
|
27
|
+
overall community
|
22
28
|
|
23
|
-
Examples of unacceptable behavior
|
29
|
+
Examples of unacceptable behavior include:
|
24
30
|
|
25
|
-
* The use of sexualized language or imagery and
|
26
|
-
advances
|
27
|
-
* Trolling, insulting
|
31
|
+
* The use of sexualized language or imagery, and sexual attention or
|
32
|
+
advances of any kind
|
33
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
28
34
|
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or
|
30
|
-
address, without explicit permission
|
35
|
+
* Publishing others' private information, such as a physical or email
|
36
|
+
address, without their explicit permission
|
31
37
|
* Other conduct which could reasonably be considered inappropriate in a
|
32
38
|
professional setting
|
33
39
|
|
34
|
-
##
|
40
|
+
## Enforcement Responsibilities
|
35
41
|
|
36
|
-
|
37
|
-
behavior and
|
38
|
-
response to any
|
42
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
43
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
44
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
45
|
+
or harmful.
|
39
46
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
threatening, offensive, or harmful.
|
47
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
48
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
49
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
50
|
+
decisions when appropriate.
|
45
51
|
|
46
52
|
## Scope
|
47
53
|
|
48
|
-
This Code of Conduct applies
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
representative at an online or offline event.
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
55
|
+
an individual is officially representing the community in public spaces.
|
56
|
+
Examples of representing our community include using an official e-mail address,
|
57
|
+
posting via an official social media account, or acting as an appointed
|
58
|
+
representative at an online or offline event.
|
54
59
|
|
55
60
|
## Enforcement
|
56
61
|
|
57
62
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
+
reported to the community leaders responsible for enforcement at
|
64
|
+
[INSERT CONTACT METHOD].
|
65
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
66
|
+
|
67
|
+
All community leaders are obligated to respect the privacy and security of the
|
68
|
+
reporter of any incident.
|
69
|
+
|
70
|
+
## Enforcement Guidelines
|
71
|
+
|
72
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
73
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
74
|
+
|
75
|
+
### 1. Correction
|
76
|
+
|
77
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
78
|
+
unprofessional or unwelcome in the community.
|
79
|
+
|
80
|
+
**Consequence**: A private, written warning from community leaders, providing
|
81
|
+
clarity around the nature of the violation and an explanation of why the
|
82
|
+
behavior was inappropriate. A public apology may be requested.
|
83
|
+
|
84
|
+
### 2. Warning
|
63
85
|
|
64
|
-
|
65
|
-
|
66
|
-
|
86
|
+
**Community Impact**: A violation through a single incident or series
|
87
|
+
of actions.
|
88
|
+
|
89
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
90
|
+
interaction with the people involved, including unsolicited interaction with
|
91
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
92
|
+
includes avoiding interactions in community spaces as well as external channels
|
93
|
+
like social media. Violating these terms may lead to a temporary or
|
94
|
+
permanent ban.
|
95
|
+
|
96
|
+
### 3. Temporary Ban
|
97
|
+
|
98
|
+
**Community Impact**: A serious violation of community standards, including
|
99
|
+
sustained inappropriate behavior.
|
100
|
+
|
101
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
102
|
+
communication with the community for a specified period of time. No public or
|
103
|
+
private interaction with the people involved, including unsolicited interaction
|
104
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
105
|
+
Violating these terms may lead to a permanent ban.
|
106
|
+
|
107
|
+
### 4. Permanent Ban
|
108
|
+
|
109
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
110
|
+
standards, including sustained inappropriate behavior, harassment of an
|
111
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
112
|
+
|
113
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
114
|
+
the community.
|
67
115
|
|
68
116
|
## Attribution
|
69
117
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
71
|
-
available at
|
118
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
119
|
+
version 2.0, available at
|
120
|
+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
121
|
+
|
122
|
+
Community Impact Guidelines were inspired by
|
123
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
124
|
+
|
125
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
126
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
127
|
+
at [https://www.contributor-covenant.org/translations][translations].
|
72
128
|
|
73
|
-
[homepage]:
|
74
|
-
[
|
129
|
+
[homepage]: https://www.contributor-covenant.org
|
130
|
+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
131
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
132
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
133
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/Gemfile
CHANGED
@@ -1,29 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
5
|
+
gemspec
|
6
|
+
|
3
7
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
8
|
|
5
9
|
gem 'faraday', ['>= 0.8', '< 2.0'], :platforms => [:jruby_18, :ruby_18]
|
6
10
|
gem 'jwt', '< 1.5.2', :platforms => [:jruby_18, :ruby_18]
|
7
11
|
gem 'rake', '< 11.0'
|
8
|
-
gem 'rdoc', '~> 4.2.2'
|
9
12
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
ruby_version = Gem::Version.new(RUBY_VERSION)
|
14
|
+
|
15
|
+
### deps for documentation and rdoc.info
|
16
|
+
group :documentation do
|
17
|
+
gem 'github-markup', :platform => :mri
|
18
|
+
gem 'rdoc'
|
19
|
+
gem 'redcarpet', :platform => :mri
|
20
|
+
gem 'yard', :require => false
|
21
|
+
end
|
22
|
+
|
23
|
+
group :development, :test do
|
24
|
+
if ruby_version >= Gem::Version.new('2.4')
|
25
|
+
# No need to run byebug / pry on earlier versions
|
26
|
+
gem 'byebug', :platform => :mri
|
27
|
+
gem 'pry', :platform => :mri
|
28
|
+
gem 'pry-byebug', :platform => :mri
|
18
29
|
end
|
19
|
-
gem 'pry', '~> 0.11' if ruby_version >= Gem::Version.new('2.0')
|
20
30
|
|
31
|
+
if ruby_version >= Gem::Version.new('2.7')
|
32
|
+
# No need to run rubocop or simplecov on earlier versions
|
33
|
+
gem 'rubocop', '~> 1.9', :platform => :mri
|
34
|
+
gem 'rubocop-md', :platform => :mri
|
35
|
+
gem 'rubocop-packaging', :platform => :mri
|
36
|
+
gem 'rubocop-performance', :platform => :mri
|
37
|
+
gem 'rubocop-rake', :platform => :mri
|
38
|
+
gem 'rubocop-rspec', :platform => :mri
|
39
|
+
|
40
|
+
gem 'coveralls'
|
41
|
+
gem 'simplecov', :platform => :mri
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
group :test do
|
21
46
|
gem 'addressable', '~> 2.3.8'
|
22
47
|
gem 'backports'
|
23
|
-
gem 'coveralls'
|
24
48
|
gem 'rack', '~> 1.2', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19, :ruby_20, :ruby_21]
|
25
49
|
gem 'rspec', '>= 3'
|
26
|
-
gem 'simplecov', '>= 0.9'
|
27
50
|
|
28
51
|
platforms :jruby_18, :ruby_18 do
|
29
52
|
gem 'mime-types', '~> 1.25'
|
@@ -36,5 +59,3 @@ group :test do
|
|
36
59
|
gem 'tins', '< 1.7'
|
37
60
|
end
|
38
61
|
end
|
39
|
-
|
40
|
-
gemspec
|
data/README.md
CHANGED
@@ -79,7 +79,7 @@ client.auth_code.authorize_url(:redirect_uri => 'http://localhost:8080/oauth2/ca
|
|
79
79
|
# => "https://example.org/oauth/authorization?response_type=code&client_id=client_id&redirect_uri=http://localhost:8080/oauth2/callback"
|
80
80
|
|
81
81
|
token = client.auth_code.get_token('authorization_code_value', :redirect_uri => 'http://localhost:8080/oauth2/callback', :headers => {'Authorization' => 'Basic some_password'})
|
82
|
-
response = token.get('/api/resource', :params => {
|
82
|
+
response = token.get('/api/resource', :params => {'query_foo' => 'bar'})
|
83
83
|
response.class.name
|
84
84
|
# => OAuth2::Response
|
85
85
|
```
|
@@ -166,7 +166,7 @@ implementations:
|
|
166
166
|
|
167
167
|
* Ruby 2.2 - Support ends with version 2.x series
|
168
168
|
* Ruby 2.3 - Support ends with version 3.x series
|
169
|
-
- [JRuby 9.1][jruby-9.1] (targets MRI v2.3)
|
169
|
+
- [JRuby 9.1][jruby-9.1] (targets MRI v2.3)
|
170
170
|
* Ruby 2.4 - Support ends with version 4.x series
|
171
171
|
* Ruby 2.5 - Support ends with version 5.x series
|
172
172
|
- [JRuby 9.2][jruby-9.2] (targets MRI v2.5)
|
@@ -230,7 +230,7 @@ spec.add_dependency 'oauth2', '~> 1.4'
|
|
230
230
|
|
231
231
|
## Development
|
232
232
|
|
233
|
-
After checking out the repo, run `
|
233
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests.
|
234
234
|
|
235
235
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
236
236
|
|
data/Rakefile
CHANGED
data/gemfiles/jruby_1.7.gemfile
CHANGED
data/gemfiles/jruby_9.0.gemfile
CHANGED
data/gemfiles/ruby_1.9.gemfile
CHANGED
data/gemfiles/ruby_head.gemfile
CHANGED
data/lib/oauth2/access_token.rb
CHANGED
@@ -3,6 +3,7 @@ module OAuth2
|
|
3
3
|
attr_reader :client, :token, :expires_in, :expires_at, :params
|
4
4
|
attr_accessor :options, :refresh_token
|
5
5
|
|
6
|
+
# Should these methods be deprecated?
|
6
7
|
class << self
|
7
8
|
# Initializes an AccessToken from a Hash
|
8
9
|
#
|
@@ -48,9 +49,9 @@ module OAuth2
|
|
48
49
|
@expires_in &&= @expires_in.to_i
|
49
50
|
@expires_at &&= convert_expires_at(@expires_at)
|
50
51
|
@expires_at ||= Time.now.to_i + @expires_in if @expires_in
|
51
|
-
@options = {:mode
|
52
|
+
@options = {:mode => opts.delete(:mode) || :header,
|
52
53
|
:header_format => opts.delete(:header_format) || 'Bearer %s',
|
53
|
-
:param_name
|
54
|
+
:param_name => opts.delete(:param_name) || 'access_token'}
|
54
55
|
@params = opts
|
55
56
|
end
|
56
57
|
|
@@ -81,6 +82,7 @@ module OAuth2
|
|
81
82
|
# @note options should be carried over to the new AccessToken
|
82
83
|
def refresh!(params = {})
|
83
84
|
raise('A refresh_token is not available') unless refresh_token
|
85
|
+
|
84
86
|
params[:grant_type] = 'refresh_token'
|
85
87
|
params[:refresh_token] = refresh_token
|
86
88
|
new_token = @client.get_token(params)
|
@@ -149,7 +151,7 @@ module OAuth2
|
|
149
151
|
|
150
152
|
private
|
151
153
|
|
152
|
-
def configure_authentication!(opts) # rubocop:disable
|
154
|
+
def configure_authentication!(opts) # rubocop:disable Metrics/AbcSize
|
153
155
|
case options[:mode]
|
154
156
|
when :header
|
155
157
|
opts[:headers] ||= {}
|
@@ -174,6 +176,7 @@ module OAuth2
|
|
174
176
|
expires_at_i = expires_at.to_i
|
175
177
|
return expires_at_i if expires_at_i > Time.now.utc.to_i
|
176
178
|
return Time.parse(expires_at).to_i if expires_at.is_a?(String)
|
179
|
+
|
177
180
|
expires_at_i
|
178
181
|
end
|
179
182
|
end
|
data/lib/oauth2/authenticator.rb
CHANGED
@@ -49,7 +49,7 @@ module OAuth2
|
|
49
49
|
# When using schemes that don't require the client_secret to be passed i.e TLS Client Auth,
|
50
50
|
# we don't want to send the secret
|
51
51
|
def apply_client_id(params)
|
52
|
-
{
|
52
|
+
{'client_id' => id}.merge(params)
|
53
53
|
end
|
54
54
|
|
55
55
|
# Adds an `Authorization` header with Basic Auth credentials if and only if
|
data/lib/oauth2/client.rb
CHANGED
@@ -4,6 +4,8 @@ require 'logger'
|
|
4
4
|
module OAuth2
|
5
5
|
# The OAuth2::Client class
|
6
6
|
class Client # rubocop:disable Metrics/ClassLength
|
7
|
+
RESERVED_PARAM_KEYS = %w[headers parse].freeze
|
8
|
+
|
7
9
|
attr_reader :id, :secret, :site
|
8
10
|
attr_accessor :options
|
9
11
|
attr_writer :connection
|
@@ -23,8 +25,8 @@ module OAuth2
|
|
23
25
|
# @option opts [Symbol] :auth_scheme (:basic_auth) HTTP method to use to authorize request (:basic_auth or :request_body)
|
24
26
|
# @option opts [Hash] :connection_opts ({}) Hash of connection options to pass to initialize Faraday with
|
25
27
|
# @option opts [FixNum] :max_redirects (5) maximum number of redirects to follow
|
26
|
-
# @option opts [Boolean] :raise_errors (true) whether or not to raise an OAuth2::Error
|
27
|
-
#
|
28
|
+
# @option opts [Boolean] :raise_errors (true) whether or not to raise an OAuth2::Error on responses with 400+ status codes
|
29
|
+
# @option opts [Proc] :extract_access_token proc that extracts the access token from the response
|
28
30
|
# @yield [builder] The Faraday connection builder
|
29
31
|
def initialize(client_id, client_secret, options = {}, &block)
|
30
32
|
opts = options.dup
|
@@ -32,14 +34,18 @@ module OAuth2
|
|
32
34
|
@secret = client_secret
|
33
35
|
@site = opts.delete(:site)
|
34
36
|
ssl = opts.delete(:ssl)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
|
38
|
+
@options = {
|
39
|
+
:authorize_url => '/oauth/authorize',
|
40
|
+
:token_url => '/oauth/token',
|
41
|
+
:token_method => :post,
|
42
|
+
:auth_scheme => :request_body,
|
43
|
+
:connection_opts => {},
|
44
|
+
:connection_build => block,
|
45
|
+
:max_redirects => 5,
|
46
|
+
:raise_errors => true,
|
47
|
+
:extract_access_token => DEFAULT_EXTRACT_ACCESS_TOKEN,
|
48
|
+
}.merge(opts)
|
43
49
|
@options[:connection_opts][:ssl] = ssl if ssl
|
44
50
|
end
|
45
51
|
|
@@ -91,7 +97,7 @@ module OAuth2
|
|
91
97
|
# code response for this request. Will default to client option
|
92
98
|
# @option opts [Symbol] :parse @see Response::initialize
|
93
99
|
# @yield [req] The Faraday request
|
94
|
-
def request(verb, url, opts = {}) # rubocop:disable
|
100
|
+
def request(verb, url, opts = {}) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
95
101
|
connection.response :logger, ::Logger.new($stdout) if ENV['OAUTH_DEBUG'] == 'true'
|
96
102
|
|
97
103
|
url = connection.build_url(url).to_s
|
@@ -107,6 +113,7 @@ module OAuth2
|
|
107
113
|
opts[:redirect_count] ||= 0
|
108
114
|
opts[:redirect_count] += 1
|
109
115
|
return response if opts[:redirect_count] > options[:max_redirects]
|
116
|
+
|
110
117
|
if response.status == 303
|
111
118
|
verb = :get
|
112
119
|
opts.delete(:body)
|
@@ -118,6 +125,7 @@ module OAuth2
|
|
118
125
|
when 400..599
|
119
126
|
error = Error.new(response)
|
120
127
|
raise(error) if opts.fetch(:raise_errors, options[:raise_errors])
|
128
|
+
|
121
129
|
response.error = error
|
122
130
|
response
|
123
131
|
else
|
@@ -132,7 +140,16 @@ module OAuth2
|
|
132
140
|
# @param [Hash] access token options, to pass to the AccessToken object
|
133
141
|
# @param [Class] class of access token for easier subclassing OAuth2::AccessToken
|
134
142
|
# @return [AccessToken] the initialized AccessToken
|
135
|
-
def get_token(params, access_token_opts = {},
|
143
|
+
def get_token(params, access_token_opts = {}, extract_access_token = options[:extract_access_token]) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
144
|
+
params = params.map do |key, value|
|
145
|
+
if RESERVED_PARAM_KEYS.include?(key)
|
146
|
+
[key.to_sym, value]
|
147
|
+
else
|
148
|
+
[key, value]
|
149
|
+
end
|
150
|
+
end
|
151
|
+
params = Hash[params]
|
152
|
+
|
136
153
|
params = Authenticator.new(id, secret, options[:auth_scheme]).apply(params)
|
137
154
|
opts = {:raise_errors => options[:raise_errors], :parse => params.delete(:parse)}
|
138
155
|
headers = params.delete(:headers) || {}
|
@@ -145,11 +162,18 @@ module OAuth2
|
|
145
162
|
end
|
146
163
|
opts[:headers].merge!(headers)
|
147
164
|
response = request(options[:token_method], token_url, opts)
|
148
|
-
|
165
|
+
|
166
|
+
access_token = begin
|
167
|
+
build_access_token(response, access_token_opts, extract_access_token)
|
168
|
+
rescue StandardError
|
169
|
+
nil
|
170
|
+
end
|
171
|
+
|
172
|
+
if options[:raise_errors] && !access_token
|
149
173
|
error = Error.new(response)
|
150
174
|
raise(error)
|
151
175
|
end
|
152
|
-
|
176
|
+
access_token
|
153
177
|
end
|
154
178
|
|
155
179
|
# The Authorization Code strategy
|
@@ -208,4 +232,26 @@ module OAuth2
|
|
208
232
|
end
|
209
233
|
end
|
210
234
|
end
|
235
|
+
|
236
|
+
DEFAULT_EXTRACT_ACCESS_TOKEN = proc do |client, hash|
|
237
|
+
token = hash.delete('access_token') || hash.delete(:access_token)
|
238
|
+
token && AccessToken.new(client, token, hash)
|
239
|
+
end
|
240
|
+
|
241
|
+
private
|
242
|
+
|
243
|
+
def build_access_token(response, access_token_opts, extract_access_token)
|
244
|
+
parsed_response = response.parsed.dup
|
245
|
+
return unless parsed_response.is_a?(Hash)
|
246
|
+
|
247
|
+
hash = parsed_response.merge(access_token_opts)
|
248
|
+
|
249
|
+
# Provide backwards compatibility for old AcessToken.form_hash pattern
|
250
|
+
# Should be deprecated in 2.x
|
251
|
+
if extract_access_token.is_a?(Class) && extract_access_token.respond_to?(:from_hash)
|
252
|
+
extract_access_token.from_hash(self, hash)
|
253
|
+
else
|
254
|
+
extract_access_token.call(self, hash)
|
255
|
+
end
|
256
|
+
end
|
211
257
|
end
|
data/lib/oauth2/mac_token.rb
CHANGED
@@ -98,9 +98,17 @@ module OAuth2
|
|
98
98
|
@algorithm = begin
|
99
99
|
case alg.to_s
|
100
100
|
when 'hmac-sha-1'
|
101
|
-
|
101
|
+
begin
|
102
|
+
OpenSSL::Digest('SHA1').new
|
103
|
+
rescue StandardError
|
104
|
+
OpenSSL::Digest.new('SHA1')
|
105
|
+
end
|
102
106
|
when 'hmac-sha-256'
|
103
|
-
|
107
|
+
begin
|
108
|
+
OpenSSL::Digest('SHA256').new
|
109
|
+
rescue StandardError
|
110
|
+
OpenSSL::Digest.new('SHA256')
|
111
|
+
end
|
104
112
|
else
|
105
113
|
raise(ArgumentError, 'Unsupported algorithm')
|
106
114
|
end
|
data/lib/oauth2/response.rb
CHANGED
@@ -11,9 +11,9 @@ module OAuth2
|
|
11
11
|
# Procs that, when called, will parse a response body according
|
12
12
|
# to the specified format.
|
13
13
|
@@parsers = {
|
14
|
-
:json
|
14
|
+
:json => lambda { |body| MultiJson.load(body) rescue body }, # rubocop:disable Style/RescueModifier
|
15
15
|
:query => lambda { |body| Rack::Utils.parse_query(body) },
|
16
|
-
:text
|
16
|
+
:text => lambda { |body| body },
|
17
17
|
}
|
18
18
|
|
19
19
|
# Content type assignments for various potential HTTP content types.
|
@@ -68,6 +68,7 @@ module OAuth2
|
|
68
68
|
# application/json Content-Type response bodies
|
69
69
|
def parsed
|
70
70
|
return nil unless @@parsers.key?(parser)
|
71
|
+
|
71
72
|
@parsed ||= @@parsers[parser].call(body)
|
72
73
|
end
|
73
74
|
|
@@ -79,11 +80,12 @@ module OAuth2
|
|
79
80
|
# Determines the parser that will be used to supply the content of #parsed
|
80
81
|
def parser
|
81
82
|
return options[:parse].to_sym if @@parsers.key?(options[:parse])
|
83
|
+
|
82
84
|
@@content_types[content_type]
|
83
85
|
end
|
84
86
|
end
|
85
87
|
end
|
86
88
|
|
87
89
|
OAuth2::Response.register_parser(:xml, ['text/xml', 'application/rss+xml', 'application/rdf+xml', 'application/atom+xml']) do |body|
|
88
|
-
MultiXml.parse(body) rescue body # rubocop:disable RescueModifier
|
90
|
+
MultiXml.parse(body) rescue body # rubocop:disable Style/RescueModifier
|
89
91
|
end
|
@@ -50,10 +50,10 @@ module OAuth2
|
|
50
50
|
def build_request(params)
|
51
51
|
assertion = build_assertion(params)
|
52
52
|
{
|
53
|
-
:grant_type
|
53
|
+
:grant_type => 'assertion',
|
54
54
|
:assertion_type => 'urn:ietf:params:oauth:grant-type:jwt-bearer',
|
55
|
-
:assertion
|
56
|
-
:scope
|
55
|
+
:assertion => assertion,
|
56
|
+
:scope => params[:scope],
|
57
57
|
}
|
58
58
|
end
|
59
59
|
|
@@ -18,8 +18,8 @@ module OAuth2
|
|
18
18
|
# @param [Hash] params additional params
|
19
19
|
def get_token(username, password, params = {}, opts = {})
|
20
20
|
params = {'grant_type' => 'password',
|
21
|
-
'username'
|
22
|
-
'password'
|
21
|
+
'username' => username,
|
22
|
+
'password' => password}.merge(params)
|
23
23
|
@client.get_token(params, opts)
|
24
24
|
end
|
25
25
|
end
|
data/lib/oauth2/version.rb
CHANGED
data/maintenance-branch
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
master
|
data/oauth2.gemspec
CHANGED
@@ -20,14 +20,14 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.required_ruby_version = '>= 1.9.0'
|
21
21
|
spec.required_rubygems_version = '>= 1.3.5'
|
22
22
|
spec.summary = 'A Ruby wrapper for the OAuth 2.0 protocol.'
|
23
|
-
spec.version = OAuth2::Version
|
23
|
+
spec.version = OAuth2::Version.to_s
|
24
24
|
|
25
25
|
spec.metadata = {
|
26
|
-
'bug_tracker_uri'
|
27
|
-
'changelog_uri'
|
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
28
|
'documentation_uri' => "https://www.rubydoc.info/gems/oauth2/#{spec.version}",
|
29
|
-
'source_code_uri'
|
30
|
-
'wiki_uri'
|
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
31
|
}
|
32
32
|
|
33
33
|
spec.require_paths = %w[lib]
|
@@ -44,9 +44,9 @@ Gem::Specification.new do |spec|
|
|
44
44
|
spec.add_development_dependency 'rake', '~> 12.3'
|
45
45
|
spec.add_development_dependency 'rdoc', ['>= 5.0', '< 7']
|
46
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
47
|
spec.add_development_dependency 'rspec-block_is_expected'
|
48
|
+
spec.add_development_dependency 'rspec-pending_for'
|
49
|
+
spec.add_development_dependency 'rspec-stubbed_env'
|
50
50
|
spec.add_development_dependency 'silent_stream'
|
51
51
|
spec.add_development_dependency 'wwtd'
|
52
52
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
8
8
|
- Michael Bleigh
|
9
9
|
- Erik Michaels-Ober
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
@@ -205,7 +205,7 @@ dependencies:
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '3.0'
|
207
207
|
- !ruby/object:Gem::Dependency
|
208
|
-
name: rspec-
|
208
|
+
name: rspec-block_is_expected
|
209
209
|
requirement: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
211
|
- - ">="
|
@@ -233,7 +233,7 @@ dependencies:
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
- !ruby/object:Gem::Dependency
|
236
|
-
name: rspec-
|
236
|
+
name: rspec-stubbed_env
|
237
237
|
requirement: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
239
|
- - ">="
|
@@ -283,6 +283,9 @@ extensions: []
|
|
283
283
|
extra_rdoc_files: []
|
284
284
|
files:
|
285
285
|
- ".document"
|
286
|
+
- ".github/dependabot.yml"
|
287
|
+
- ".github/workflows/style.yml"
|
288
|
+
- ".github/workflows/test.yml"
|
286
289
|
- ".gitignore"
|
287
290
|
- ".jrubyrc"
|
288
291
|
- ".rspec"
|
@@ -305,13 +308,6 @@ files:
|
|
305
308
|
- gemfiles/jruby_head.gemfile
|
306
309
|
- gemfiles/ruby_1.9.gemfile
|
307
310
|
- gemfiles/ruby_2.0.gemfile
|
308
|
-
- gemfiles/ruby_2.1.gemfile
|
309
|
-
- gemfiles/ruby_2.2.gemfile
|
310
|
-
- gemfiles/ruby_2.3.gemfile
|
311
|
-
- gemfiles/ruby_2.4.gemfile
|
312
|
-
- gemfiles/ruby_2.5.gemfile
|
313
|
-
- gemfiles/ruby_2.6.gemfile
|
314
|
-
- gemfiles/ruby_2.7.gemfile
|
315
311
|
- gemfiles/ruby_head.gemfile
|
316
312
|
- gemfiles/truffleruby.gemfile
|
317
313
|
- lib/oauth2.rb
|
@@ -328,17 +324,18 @@ files:
|
|
328
324
|
- lib/oauth2/strategy/implicit.rb
|
329
325
|
- lib/oauth2/strategy/password.rb
|
330
326
|
- lib/oauth2/version.rb
|
327
|
+
- maintenance-branch
|
331
328
|
- oauth2.gemspec
|
332
329
|
homepage: https://github.com/oauth-xx/oauth2
|
333
330
|
licenses:
|
334
331
|
- MIT
|
335
332
|
metadata:
|
336
333
|
bug_tracker_uri: https://github.com/oauth-xx/oauth2/issues
|
337
|
-
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.
|
338
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.
|
339
|
-
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.
|
334
|
+
changelog_uri: https://github.com/oauth-xx/oauth2/blob/v1.4.5/CHANGELOG.md
|
335
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth2/1.4.5
|
336
|
+
source_code_uri: https://github.com/oauth-xx/oauth2/tree/v1.4.5
|
340
337
|
wiki_uri: https://github.com/oauth-xx/oauth2/wiki
|
341
|
-
post_install_message:
|
338
|
+
post_install_message:
|
342
339
|
rdoc_options: []
|
343
340
|
require_paths:
|
344
341
|
- lib
|
@@ -353,8 +350,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
350
|
- !ruby/object:Gem::Version
|
354
351
|
version: 1.3.5
|
355
352
|
requirements: []
|
356
|
-
rubygems_version: 3.
|
357
|
-
signing_key:
|
353
|
+
rubygems_version: 3.2.9
|
354
|
+
signing_key:
|
358
355
|
specification_version: 4
|
359
356
|
summary: A Ruby wrapper for the OAuth 2.0 protocol.
|
360
357
|
test_files: []
|
data/gemfiles/ruby_2.1.gemfile
DELETED
data/gemfiles/ruby_2.2.gemfile
DELETED
data/gemfiles/ruby_2.3.gemfile
DELETED
data/gemfiles/ruby_2.4.gemfile
DELETED
data/gemfiles/ruby_2.5.gemfile
DELETED
data/gemfiles/ruby_2.6.gemfile
DELETED