diff --git a/.idea/csv-editor.xml b/.idea/csv-editor.xml deleted file mode 100644 index b10a2bac..00000000 --- a/.idea/csv-editor.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.rubocop b/.rubocop new file mode 100644 index 00000000..00dd72ee --- /dev/null +++ b/.rubocop @@ -0,0 +1 @@ +--config .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml index 485f75b4..6d11146f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,6 +9,13 @@ plugins: rubocop-on-rbs RBS: Enabled: true +# This tells RuboCop to add the exclusions in this file +# to the default exclusions (and those from other inherited files), +# rather than overwriting them. +inherit_mode: + merge: + - Exclude + AllCops: DisplayCopNames: true # Display the name of the failing cops Exclude: diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index ae390c31..e11e08c0 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -1,59 +1,21 @@ { - "bin/bundle:3976421676": [ - [66, 5, 20, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2485198147], - [78, 5, 74, "Style/InvertibleUnlessCondition: Prefer `if Gem.rubygems_version >= Gem::Version.new(\"2.7.0\")` over `unless Gem.rubygems_version < Gem::Version.new(\"2.7.0\")`.", 2453573257] + "bin/bundle:872096170": [ + [66, 5, 20, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2485198147] ], - "lib/oauth2.rb:2435263975": [ - [73, 11, 7, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 651502127] + "lib/oauth2.rb:3283430588": [ + [57, 7, 7, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 651502127] ], - "lib/oauth2/access_token.rb:1962777363": [ - [64, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513], - [70, 13, 5, "Style/IdenticalConditionalBranches: Move `t_key` out of the conditional.", 183811513] + "lib/oauth2/filtered_attributes.rb:3925029601": [ + [13, 5, 63, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2901108034] ], - "lib/oauth2/authenticator.rb:158201238": [ - [59, 5, 113, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 734523108] - ], - "lib/oauth2/filtered_attributes.rb:321265140": [ - [13, 5, 63, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2901108034], - [24, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020], - [31, 9, 25, "ThreadSafety/ClassInstanceVariable: Avoid class instance variables.", 2012823020] - ], - "lib/oauth2/response.rb:2054901929": [ - [53, 5, 204, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 996912427] - ], - "spec/oauth2/access_token_spec.rb:3152504592": [ - [3, 1, 34, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/access_token*_spec.rb`.", 1972107547], - [854, 13, 25, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 770233088], - [924, 9, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3022740639], - [928, 9, 79, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2507338967] - ], - "spec/oauth2/authenticator_spec.rb:853320290": [ - [3, 1, 36, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/authenticator*_spec.rb`.", 819808017], - [51, 15, 20, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 482779785], - [60, 15, 33, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 297534737], - [69, 15, 38, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1480816240], - [79, 13, 23, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2314399065] - ], - "spec/oauth2/client_spec.rb:2143306493": [ - [6, 1, 29, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/client*_spec.rb`.", 439549885], - [175, 7, 492, "RSpec/NoExpectationExample: No expectation found in this example.", 1272021224], - [194, 7, 592, "RSpec/NoExpectationExample: No expectation found in this example.", 3428877205], + "spec/oauth2/client_spec.rb:1785648507": [ [207, 15, 20, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 2320605227], [222, 15, 20, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1276531672], [237, 15, 43, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 1383956904], [252, 15, 43, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3376202107], - [839, 5, 360, "RSpec/NoExpectationExample: No expectation found in this example.", 536201463], - [848, 5, 461, "RSpec/NoExpectationExample: No expectation found in this example.", 3392600621], - [859, 5, 340, "RSpec/NoExpectationExample: No expectation found in this example.", 244592251], - [987, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886], - [991, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529], - [999, 7, 89, "RSpec/NoExpectationExample: No expectation found in this example.", 4609419], - [1087, 11, 99, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3084776886], - [1091, 11, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1524553529], - [1171, 17, 12, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 664794325] + [1175, 17, 12, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 664794325] ], "spec/oauth2/error_spec.rb:1692696277": [ - [23, 1, 28, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/error*_spec.rb`.", 3385870076], [93, 11, 460, "RSpec/NoExpectationExample: No expectation found in this example.", 3630511675], [108, 11, 210, "RSpec/NoExpectationExample: No expectation found in this example.", 3948582233], [240, 11, 534, "RSpec/NoExpectationExample: No expectation found in this example.", 3347340910], @@ -61,32 +23,5 @@ [314, 11, 534, "RSpec/NoExpectationExample: No expectation found in this example.", 3347340910], [375, 11, 534, "RSpec/NoExpectationExample: No expectation found in this example.", 3347340910], [391, 11, 210, "RSpec/NoExpectationExample: No expectation found in this example.", 3948582233] - ], - "spec/oauth2/response_spec.rb:4032173622": [ - [3, 1, 31, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/response*_spec.rb`.", 3190869319] - ], - "spec/oauth2/strategy/assertion_spec.rb:3524328522": [ - [6, 1, 42, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/strategy/assertion*_spec.rb`.", 3665690869] - ], - "spec/oauth2/strategy/auth_code_spec.rb:142083698": [ - [4, 1, 41, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/strategy/auth_code*_spec.rb`.", 1553708922] - ], - "spec/oauth2/strategy/base_spec.rb:2524881749": [ - [3, 1, 37, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/strategy/base*_spec.rb`.", 1951594922] - ], - "spec/oauth2/strategy/client_credentials_spec.rb:2609739899": [ - [3, 1, 50, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/strategy/client_credentials*_spec.rb`.", 690311422] - ], - "spec/oauth2/strategy/implicit_spec.rb:1595799281": [ - [3, 1, 41, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/strategy/implicit*_spec.rb`.", 3731171632] - ], - "spec/oauth2/strategy/password_spec.rb:331601826": [ - [3, 1, 41, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/strategy/password*_spec.rb`.", 3463323840] - ], - "spec/oauth2/version_spec.rb:1001406821": [ - [3, 1, 30, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2/version*_spec.rb`.", 1099517182] - ], - "spec/oauth2_spec.rb:4211477230": [ - [3, 1, 21, "RSpec/SpecFilePathFormat: Spec path should end with `o_auth2*_spec.rb`.", 3359091140] ] } diff --git a/.rubocop_rspec.yml b/.rubocop_rspec.yml index 45f84ad3..e01352f4 100644 --- a/.rubocop_rspec.yml +++ b/.rubocop_rspec.yml @@ -31,4 +31,7 @@ RSpec/MultipleMemoizedHelpers: RSpec/SpecFilePathFormat: CustomTransform: - "OAuth": "oauth" + "OAuth2": "oauth2" + +RSpec/Output: + Enabled: false diff --git a/.tool-versions b/.tool-versions index 048c75ee..d0af35b1 100755 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ direnv 2.32.2 -ruby 3.4.7 +ruby 4.0.1 diff --git a/Gemfile.lock b/Gemfile.lock index 936086a3..b3ac3a74 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,61 +25,61 @@ PATH GEM remote: https://gem.coop/ specs: - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.8.9) + public_suffix (>= 2.0.2, < 8.0) ansi (1.5.0) - appraisal2 (3.0.0) + appraisal2 (3.0.6) bundler (>= 1.17.3) rake (>= 10) thor (>= 0.14) ast (2.4.3) - backports (3.25.2) + backports (3.25.3) base64 (0.3.0) benchmark (0.5.0) - bigdecimal (3.3.1) - bundler-audit (0.9.2) - bundler (>= 1.2.0, < 3) + bigdecimal (4.0.1) + bundler-audit (0.9.3) + bundler (>= 1.2.0) thor (~> 1.0) - concurrent-ruby (1.3.5) - date (3.5.0) - debug (1.11.0) + concurrent-ruby (1.3.6) + date (3.5.1) + debug (1.11.1) irb (~> 1.10) reline (>= 0.3.8) - delegate (0.4.0) + delegate (0.6.1) diff-lcs (1.6.2) diffy (3.4.4) docile (1.4.1) dry-configurable (1.3.0) dry-core (~> 1.1) zeitwerk (~> 2.6) - dry-core (1.1.0) + dry-core (1.2.0) concurrent-ruby (~> 1.0) logger zeitwerk (~> 2.6) - dry-inflector (1.2.0) + dry-inflector (1.3.1) dry-initializer (3.2.0) dry-logic (1.6.0) bigdecimal concurrent-ruby (~> 1.0) dry-core (~> 1.1) zeitwerk (~> 2.6) - dry-schema (1.14.1) + dry-schema (1.15.0) concurrent-ruby (~> 1.0) dry-configurable (~> 1.0, >= 1.0.1) dry-core (~> 1.1) dry-initializer (~> 3.2) - dry-logic (~> 1.5) + dry-logic (~> 1.6) dry-types (~> 1.8) zeitwerk (~> 2.6) - dry-types (1.8.3) - bigdecimal (~> 3.0) + dry-types (1.9.1) + bigdecimal (>= 3.0) concurrent-ruby (~> 1.0) dry-core (~> 1.0) dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) erb (5.1.3) - faraday (2.14.0) + faraday (2.14.1) faraday-net_http (>= 2.0, < 3.5) json logger @@ -90,17 +90,19 @@ GEM version_gem (~> 1.1, >= 1.1.4) gitmoji-regex (1.0.3) version_gem (~> 1.1, >= 1.1.8) - hashie (5.0.0) - io-console (0.8.1) - irb (1.15.3) + hashie (5.1.0) + logger + io-console (0.8.2) + irb (1.17.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.16.0) + json (2.18.1) jwt (3.1.2) base64 - kettle-dev (1.1.52) - kettle-soup-cover (1.0.10) + kettle-dev (2.0.0) + kettle-soup-cover (1.1.1) simplecov (~> 0.22) simplecov-cobertura (~> 3.0) simplecov-console (~> 0.9, >= 0.9.3) @@ -108,9 +110,9 @@ GEM simplecov-lcov (~> 0.8) simplecov-rcov (~> 0.3, >= 0.3.7) simplecov_json_formatter (~> 0.1, >= 0.1.4) - version_gem (~> 1.1, >= 1.1.8) - kettle-test (1.0.6) - appraisal2 (~> 3.0) + version_gem (~> 1.1, >= 1.1.9) + kettle-test (1.0.10) + appraisal2 (~> 3.0, >= 3.0.2) backports (~> 3.0) rspec (~> 3.0) rspec-block_is_expected (~> 1.0, >= 1.0.6) @@ -120,41 +122,56 @@ GEM silent_stream (~> 1.0, >= 1.0.12) timecop-rspec (~> 1.0, >= 1.0.3) version_gem (~> 1.1, >= 1.1.9) - kramdown (2.5.1) - rexml (>= 3.3.9) + kramdown (2.5.2) + rexml (>= 3.4.4) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) - multi_xml (0.7.2) - bigdecimal (~> 3.1) + multi_xml (0.8.1) + bigdecimal (>= 3.1, < 5) mutex_m (0.3.0) - net-http (0.7.0) - uri + net-http (0.9.1) + uri (>= 0.11.1) nkf (0.2.0) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.19.1-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.1-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.19.1-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.1-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.19.1-arm64-darwin) + racc (~> 1.4) + nokogiri (1.19.1-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.19.1-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.1-x86_64-linux-musl) racc (~> 1.4) ostruct (0.6.3) parallel (1.27.0) - parser (3.3.10.0) + parser (3.3.10.2) ast (~> 2.4.1) racc pp (0.6.3) prettyprint prettyprint (0.2.0) - prism (1.6.0) - psych (5.2.6) + prism (1.9.0) + psych (5.3.1) date stringio - public_suffix (6.0.2) + public_suffix (7.0.2) racc (1.8.1) - rack (3.2.4) + rack (3.2.5) rainbow (3.1.1) rake (13.3.1) - rbs (3.9.5) + rbs (3.10.3) logger - rdoc (6.15.1) + tsort + rdoc (6.17.0) erb psych (>= 4.0.0) tsort @@ -165,7 +182,7 @@ GEM rainbow (>= 2.0, < 4.0) rexml (~> 3.1) regexp_parser (2.11.3) - reline (0.6.2) + reline (0.6.3) io-console (~> 0.5) require_bench (1.0.4) version_gem (>= 1.1.3, < 4) @@ -180,19 +197,19 @@ GEM rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.7) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-pending_for (0.1.19) + rspec-pending_for (0.1.20) rspec-core (~> 3.0) ruby_engine (~> 2.0) ruby_version (~> 1.0) version_gem (~> 1.1, >= 1.1.8) rspec-stubbed_env (1.0.4) - rspec-support (3.13.6) + rspec-support (3.13.7) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.80.2) + rubocop (1.84.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -200,12 +217,12 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.46.0, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.48.0) + rubocop-ast (1.49.0) parser (>= 3.3.7.2) - prism (~> 1.4) + prism (~> 1.7) rubocop-gradual (0.3.6) diff-lcs (>= 1.2.0, < 2.0) diffy (~> 3.0) @@ -218,7 +235,7 @@ GEM version_gem (>= 1.1.2, < 3) rubocop-md (1.2.4) rubocop (>= 1.45) - rubocop-on-rbs (1.8.0) + rubocop-on-rbs (1.9.1) lint_roller (~> 1.1) rbs (~> 3.5) rubocop (>= 1.72.1, < 2.0) @@ -226,16 +243,16 @@ GEM rubocop-packaging (0.6.0) lint_roller (~> 1.1.0) rubocop (>= 1.72.1, < 2.0) - rubocop-performance (1.25.0) + rubocop-performance (1.26.1) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) - rubocop-ast (>= 1.38.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) rubocop-rake (0.7.1) lint_roller (~> 1.1) rubocop (>= 1.72.1) - rubocop-rspec (3.7.0) + rubocop-rspec (3.9.0) lint_roller (~> 1.1) - rubocop (~> 1.72, >= 1.72.1) + rubocop (~> 1.81) rubocop-ruby2_2 (2.0.5) rubocop-gradual (~> 0.3, >= 0.3.1) rubocop-md (~> 1.2) @@ -263,7 +280,7 @@ GEM simplecov-cobertura (3.1.0) rexml simplecov (~> 0.19) - simplecov-console (0.9.4) + simplecov-console (0.9.5) ansi simplecov terminal-table @@ -275,18 +292,18 @@ GEM snaky_hash (2.0.3) hashie (>= 0.1.0, < 6) version_gem (>= 1.1.8, < 3) - standard (1.51.1) + standard (1.54.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.80.2) + rubocop (~> 1.84.0) standard-custom (~> 1.0.0) standard-performance (~> 1.8) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.8.0) + standard-performance (1.9.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.25.0) + rubocop-performance (~> 1.26.0) standard-rubocop-lts (1.0.10) rspec-block_is_expected (~> 1.0, >= 1.0.5) standard (>= 1.35.1, < 2) @@ -295,10 +312,10 @@ GEM version_gem (>= 1.1.4, < 3) stone_checksums (1.0.3) version_gem (~> 1.1, >= 1.1.9) - stringio (3.1.7) + stringio (3.2.0) terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) - thor (1.4.0) + thor (1.5.0) timecop (0.9.10) timecop-rspec (1.0.3) delegate (~> 0.1) @@ -307,25 +324,32 @@ GEM tsort (0.2.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) + unicode-emoji (4.2.0) uri (1.1.1) version_gem (1.1.9) - yard (0.9.37) - yard-fence (0.8.0) + yard (0.9.38) + yard-fence (0.8.2) rdoc (~> 6.11) version_gem (~> 1.1, >= 1.1.9) yard (~> 0.9, >= 0.9.37) yard-relative_markdown_links (0.5.0) nokogiri (>= 1.14.3, < 2) - zeitwerk (2.7.3) + zeitwerk (2.7.5) zlib (3.2.2) PLATFORMS - x86_64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES addressable (~> 2.8, >= 2.8.7, >= 2.8, < 3) - appraisal2 (~> 3.0) + appraisal2 (~> 3.0, >= 3.0.6) backports (~> 3.25, >= 3.25.1) benchmark (~> 0.4, >= 0.4.1) bundler-audit (~> 0.9.2) @@ -334,9 +358,9 @@ DEPENDENCIES gem_bench (~> 2.0, >= 2.0.5) gitmoji-regex (~> 1.0, >= 1.0.3) irb (~> 1.15, >= 1.15.2) - kettle-dev (~> 1.1) + kettle-dev (~> 2.0) kettle-soup-cover (~> 1.0, >= 1.0.10) - kettle-test (~> 1.0, >= 1.0.6) + kettle-test (~> 1.0, >= 1.0.10) kramdown (~> 2.5, >= 2.5.1) kramdown-parser-gfm (~> 1.1) mutex_m (~> 0.2) @@ -354,12 +378,142 @@ DEPENDENCIES rubocop-ruby2_2 ruby-progressbar (~> 1.13) standard (>= 1.50) - stone_checksums (~> 1.0, >= 1.0.2) + stone_checksums (~> 1.0, >= 1.0.3) stringio (>= 3.0) yard (~> 0.9, >= 0.9.37) yard-fence (~> 0.4) yard-junk (~> 0.0, >= 0.0.10)! yard-relative_markdown_links (~> 0.5.0) +CHECKSUMS + addressable (2.8.9) sha256=cc154fcbe689711808a43601dee7b980238ce54368d23e127421753e46895485 + ansi (1.5.0) sha256=5408253274e33d9d27d4a98c46d2998266fd51cba58a7eb9d08f50e57ed23592 + appraisal2 (3.0.6) sha256=09387896b6c8c8c0ff0749af691ddff5e3168de2f06b591a80d8fd8b6394d147 + ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383 + backports (3.25.3) sha256=94298d32dc3c40ca15633b54e282780b49e2db0c045f602ea1907e4f63a17235 + base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b + benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c + bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7 + bundler-audit (0.9.3) sha256=81c8766c71e47d0d28a0f98c7eed028539f21a6ea3cd8f685eb6f42333c9b4e9 + concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab + date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0 + debug (1.11.1) sha256=2e0b0ac6119f2207a6f8ac7d4a73ca8eb4e440f64da0a3136c30343146e952b6 + delegate (0.6.1) sha256=54cf946cacfe05b1c23114edd8fbd8d54e9cea7abf36b95130ab53cc88b8f7e4 + diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962 + diffy (3.4.4) sha256=79384ab5ca82d0e115b2771f0961e27c164c456074bd2ec46b637ebf7b6e47e3 + docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e + dry-configurable (1.3.0) sha256=882d862858567fc1210d2549d4c090f34370fc1bb7c5c1933de3fe792e18afa8 + dry-core (1.2.0) sha256=0cc5a7da88df397f153947eeeae42e876e999c1e30900f3c536fb173854e96a1 + dry-inflector (1.3.1) sha256=7fb0c2bb04f67638f25c52e7ba39ab435d922a3a5c3cd196120f63accb682dcc + dry-initializer (3.2.0) sha256=37d59798f912dc0a1efe14a4db4a9306989007b302dcd5f25d0a2a20c166c4e3 + dry-logic (1.6.0) sha256=da6fedbc0f90fc41f9b0cc7e6f05f5d529d1efaef6c8dcc8e0733f685745cea2 + dry-schema (1.15.0) sha256=0f2a34adba4206bd6d46ec1b6b7691b402e198eecaff1d8349a7d48a77d82cd2 + dry-types (1.9.1) sha256=baebeecdb9f8395d6c9d227b62011279440943e3ef2468fe8ccc1ba11467f178 + erb (5.1.3) sha256=566e53057b6ba48699f824b578473b391fa8aef100aa14afad1c46725fae0e67 + faraday (2.14.1) sha256=a43cceedc1e39d188f4d2cdd360a8aaa6a11da0c407052e426ba8d3fb42ef61c + faraday-net_http (3.4.2) sha256=f147758260d3526939bf57ecf911682f94926a3666502e24c69992765875906c + gem_bench (2.0.5) sha256=0dc0fb44a5a5eb7b2f5c1c68a5b0164d72007132822c012bac3abe976b199ead + gitmoji-regex (1.0.3) sha256=538c6f49f5af6dc36d1630edb89a5a66f6e14ec5850d7fd071e0331f940e553f + hashie (5.1.0) sha256=c266471896f323c446ea8207f8ffac985d2718df0a0ba98651a3057096ca3870 + io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc + irb (1.17.0) sha256=168c4ddb93d8a361a045c41d92b2952c7a118fa73f23fe14e55609eb7a863aae + json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986 + jwt (3.1.2) sha256=af6991f19a6bb4060d618d9add7a66f0eeb005ac0bc017cd01f63b42e122d535 + kettle-dev (2.0.0) sha256=f3cd1a2f8cc4f1fcc573d7e9177644873cfdfe455e26365416b4290ea09490b5 + kettle-soup-cover (1.1.1) sha256=2303885a9d8485d8d43cb250bcf73570f6b6fb997526beeaef3ef54e3501d445 + kettle-test (1.0.10) sha256=ddefc5d54b290ee6dbe5a3983128f6948fa63f624ca676c1e6cfffc9b6878179 + kramdown (2.5.2) sha256=1ba542204c66b6f9111ff00dcc26075b95b220b07f2905d8261740c82f7f02fa + kramdown-parser-gfm (1.1.0) sha256=fb39745516427d2988543bf01fc4cf0ab1149476382393e0e9c48592f6581729 + language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc + lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87 + logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 + multi_xml (0.8.1) sha256=addba0290bac34e9088bfe73dc4878530297a82a7bbd66cb44dcd0a4b86edf5a + mutex_m (0.3.0) sha256=cfcb04ac16b69c4813777022fdceda24e9f798e48092a2b817eb4c0a782b0751 + net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996 + nkf (0.2.0) sha256=fbc151bda025451f627fafdfcb3f4f13d0b22ae11f58c6d3a2939c76c5f5f126 + nokogiri (1.19.1-aarch64-linux-gnu) sha256=cfdb0eafd9a554a88f12ebcc688d2b9005f9fce42b00b970e3dc199587b27f32 + nokogiri (1.19.1-aarch64-linux-musl) sha256=1e2150ab43c3b373aba76cd1190af7b9e92103564063e48c474f7600923620b5 + nokogiri (1.19.1-arm-linux-gnu) sha256=0a39ed59abe3bf279fab9dd4c6db6fe8af01af0608f6e1f08b8ffa4e5d407fa3 + nokogiri (1.19.1-arm-linux-musl) sha256=3a18e559ee499b064aac6562d98daab3d39ba6cbb4074a1542781b2f556db47d + nokogiri (1.19.1-arm64-darwin) sha256=dfe2d337e6700eac47290407c289d56bcf85805d128c1b5a6434ddb79731cb9e + nokogiri (1.19.1-x86_64-darwin) sha256=7093896778cc03efb74b85f915a775862730e887f2e58d6921e3fa3d981e68bf + nokogiri (1.19.1-x86_64-linux-gnu) sha256=1a4902842a186b4f901078e692d12257678e6133858d0566152fe29cdb98456a + nokogiri (1.19.1-x86_64-linux-musl) sha256=4267f38ad4fc7e52a2e7ee28ed494e8f9d8eb4f4b3320901d55981c7b995fc23 + oauth2 (2.0.18) + ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912 + parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130 + parser (3.3.10.2) sha256=6f60c84aa4bdcedb6d1a2434b738fe8a8136807b6adc8f7f53b97da9bc4e9357 + pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6 + prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 + prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 + psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974 + public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857 + racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f + rack (3.2.5) sha256=4cbd0974c0b79f7a139b4812004a62e4c60b145cba76422e288ee670601ed6d3 + rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a + rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c + rbs (3.10.3) sha256=70627f3919016134d554e6c99195552ae3ef6020fe034c8e983facc9c192daa6 + rdoc (6.17.0) sha256=0f50d4e568fc98195f9bb155a9e8dff6c7feabfb515fb22ef6df1d12ad5a02b7 + reek (6.5.0) sha256=d26d3a492773b2bbc228888067a21afe33ac07954a17dbd64cdeae42c4c69be1 + regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4 + reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 + require_bench (1.0.4) sha256=c8ef54aac5c01f80bb5f110f7c08d304417a6c7b34f3683e1923227b6e65d004 + rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 + rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587 + rspec-block_is_expected (1.0.6) sha256=bbad3dc30eba93becf4dcb3fd1bff5f37f6e212ab5cbf6132c07edba6ff74282 + rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d + rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836 + rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47 + rspec-pending_for (0.1.20) sha256=2130c6c959d05b61de1955e7dd986418aec4888b6f80f0711a1f88540a09d3cb + rspec-stubbed_env (1.0.4) sha256=647886e16338bc4028fd18dde07944c945f773cc65afaa258930196da780e70f + rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c + rspec_junit_formatter (0.6.0) sha256=40dde674e6ae4e6cc0ff560da25497677e34fefd2338cc467a8972f602b62b15 + rubocop (1.84.2) sha256=5692cea54168f3dc8cb79a6fe95c5424b7ea893c707ad7a4307b0585e88dbf5f + rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd + rubocop-gradual (0.3.6) sha256=d70505a81b63f95ff7d987afe66adf559c53708e4abf06328f6e6026b6571993 + rubocop-lts (8.1.1) sha256=a3c19eec22995f0aff10b14bfc301fc11209e313c8f54189abb95e0df41d17b7 + rubocop-md (1.2.4) sha256=3e481bb08e2d7479eeba3d02359737074f58dd5694f7a57de4ad8d807fdaf6ff + rubocop-on-rbs (1.9.1) sha256=4c45fd9a7cd64baed4fe346f151bbf2ef7bd6479e27eda7eb93ff6383fbd750d + rubocop-packaging (0.6.0) sha256=fb92bd0fb48e6f8cdb1648d2249b0cd51c2497dcc87340132d22f01edbf558a7 + rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834 + rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d + rubocop-rspec (3.9.0) sha256=8fa70a3619408237d789aeecfb9beef40576acc855173e60939d63332fdb55e2 + rubocop-ruby2_2 (2.0.5) sha256=b467a27fff0aa628416bb0b20af70e06c9b7b0a596072bcfac601dd42a5ab070 + rubocop-shopify (2.18.0) sha256=dafa25e5617ce4600ff86b1de3d5b78e43ab3d58cc5729df38e492b8e10294eb + rubocop-thread_safety (0.7.3) sha256=067cdd52fbf5deffc18995437e45b5194236eaff4f71de3375a1f6052e48f431 + ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 + ruby_engine (2.0.3) sha256=ca2ae7def8cfcdc2bfb6a186d36d5d59c8b403245dc0256c3802b767fa278aaa + ruby_version (1.0.3) sha256=5930f9950746b7e6c973184398ee364ee7440b170fef7922b9f5cdf317f1ccb5 + silent_stream (1.0.12) sha256=377c43aa10033fe90c33b39ea8cd97d79f2d1c4856df598efc56f3091f3ae782 + simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5 + simplecov-cobertura (3.1.0) sha256=6d7f38aa32c965ca2174b2e5bd88cb17138eaf629518854976ac50e628925dc5 + simplecov-console (0.9.5) sha256=b1108bcfff5f210143e2b8301698c367b01586f20d25a73e95475a5df6fc6ff6 + simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246 + simplecov-lcov (0.9.0) sha256=7a77a31e200a595ed4b0249493056efd0c920601f53d2ef135ca34ee796346cd + simplecov-rcov (0.3.7) sha256=372f50bf6df6b6350b7d0c840f2f8bdabe021861a43c26877b747c9ac96139fc + simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428 + snaky_hash (2.0.3) sha256=25a3d299566e8153fb02fa23fd9a9358845950f7a523ddbbe1fa1e0d79a6d456 + standard (1.54.0) sha256=7a4b08f83d9893083c8f03bc486f0feeb6a84d48233b40829c03ef4767ea0100 + standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b + standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2 + standard-rubocop-lts (1.0.10) sha256=bdce3407fb6683a305f7f2e186858033dc88013d95bdc6ec4de8df0be55a0e47 + stone_checksums (1.0.3) sha256=1d7ee38b7c766c523cbf12ab886ffbae519a2c48288f9d8ecc7ca0deed0701fe + stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1 + terminal-table (4.0.0) sha256=f504793203f8251b2ea7c7068333053f0beeea26093ec9962e62ea79f94301d2 + thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 + timecop (0.9.10) sha256=12ba45ce57cdcf6b1043cb6cdffa6381fd89ce10d369c28a7f6f04dc1b0cd8eb + timecop-rspec (1.0.3) sha256=005f14841bb606dcaefb060e321b5388e2e59537742bee8b3a9a9a40e598fab9 + tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f + unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42 + unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f + uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 + version_gem (1.1.9) sha256=0c1a0962ae543c84a00889bb018d9f14d8f8af6029d26b295d98774e3d2eb9a4 + yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f + yard-fence (0.8.2) sha256=4efa58d682fc0eb57258a6d6a8463b61af0890082cdea45f19088b8634d9ab6f + yard-junk (0.0.10) + yard-relative_markdown_links (0.5.0) sha256=d5158786196bfb82ed8f6880cefea2ef3072cc9e774ecebd7803e0db9bbb3a71 + zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd + zlib (3.2.2) sha256=908e61263f99c1371b5422581e2d6663bd37c6b04ae13b5f8cb10b0d09379f40 + BUNDLED WITH - 2.7.2 + 4.0.7 diff --git a/bin/bundle b/bin/bundle index 4a95618e..663647ec 100755 --- a/bin/bundle +++ b/bin/bundle @@ -67,6 +67,7 @@ module_function env_var_version || cli_arg_version || bundler_requirement_for(lockfile_version) end + module_function :bundler_requirement def bundler_requirement_for(version) return "#{Gem::Requirement.default}.a" unless version @@ -75,12 +76,13 @@ module_function requirement = bundler_gem_version.approximate_recommendation - return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0") + return requirement if Gem.rubygems_version >= Gem::Version.new("2.7.0") requirement += ".a" if bundler_gem_version.prerelease? requirement end + module_function :bundler_requirement_for def load_bundler! ENV["BUNDLE_GEMFILE"] ||= gemfile diff --git a/bin/kettle-dev-setup b/bin/kettle-gh-release similarity index 66% rename from bin/kettle-dev-setup rename to bin/kettle-gh-release index 276319a7..93265cbd 100755 --- a/bin/kettle-dev-setup +++ b/bin/kettle-gh-release @@ -4,7 +4,7 @@ # # This file was generated by Bundler. # -# The application 'kettle-dev-setup' is installed as part of a gem, and +# The application 'kettle-gh-release' is installed as part of a gem, and # this file is here to facilitate running it. # @@ -13,4 +13,4 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "rubygems" require "bundler/setup" -load Gem.bin_path("kettle-dev", "kettle-dev-setup") +load Gem.bin_path("kettle-dev", "kettle-gh-release") diff --git a/bin/kettle-soup-cover b/bin/kettle-soup-cover new file mode 100755 index 00000000..32ddaca9 --- /dev/null +++ b/bin/kettle-soup-cover @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'kettle-soup-cover' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("kettle-soup-cover", "kettle-soup-cover") diff --git a/docs/OAuth2/AccessToken.html b/docs/OAuth2/AccessToken.html index 733a4c74..e69de29b 100644 --- a/docs/OAuth2/AccessToken.html +++ b/docs/OAuth2/AccessToken.html @@ -1,3093 +0,0 @@ - - - - - - - Class: OAuth2::AccessToken - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
- - -

Class: OAuth2::AccessToken - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - -
-
Includes:
-
FilteredAttributes
-
- - - - - - -
-
Defined in:
-
lib/oauth2/access_token.rb
-
- -
- -

Overview

-
-

rubocop:disable Metrics/ClassLength

- - -
-
-
- - -
- -

- Constant Summary - collapse -

- -
- -
TOKEN_KEYS_STR = - -
-
%w[access_token id_token token accessToken idToken].freeze
- -
TOKEN_KEYS_SYM = - -
-
%i[access_token id_token token accessToken idToken].freeze
- -
TOKEN_KEY_LOOKUP = - -
-
TOKEN_KEYS_STR + TOKEN_KEYS_SYM
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- - - -

- Instance Method Summary - collapse -

- - - - - - - - - - - - - -

Methods included from FilteredAttributes

-

included, #inspect

-
-

Constructor Details

- -
-

- - #initialize(client, token, opts = {}) ⇒ AccessToken - - - - - -

-
- -
- Note: -

For “soon-to-expire”/”clock-skew” functionality see the :expires_latency option.

-
-
- -
- Note: -

If no token is provided, the AccessToken will be considered invalid.
-This is to prevent the possibility of a token being accidentally
-created with no token value.
-If you want to create an AccessToken with no token value,
-you can pass in an empty string or nil for the token value.
-If you want to create an AccessToken with no token value and
-no refresh token, you can pass in an empty string or nil for the
-token value and nil for the refresh token, and raise_errors: false.

-
-
- -

Initialize an AccessToken

- - -
-
-
- -
-

Examples:

- - -

Verb-dependent Hash mode

-
- -
# Send token in query for GET, in header for POST/DELETE, in body for PUT/PATCH
-OAuth2::AccessToken.new(client, token, mode: {get: :query, post: :header, delete: :header, put: :body, patch: :body})
- -
-

Parameters:

-
    - -
  • - - client - - - (Client) - - - - — -

    the OAuth2::Client instance

    -
    - -
  • - -
  • - - token - - - (String) - - - - — -

    the Access Token value (optional, may not be used in refresh flows)

    -
    - -
  • - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    the options to create the Access Token with

    -
    - -
  • - -
- - - - - - - - -

Options Hash (opts):

-
    - -
  • - :refresh_token - (String) - - - — default: - nil - - - - —

    the refresh_token value

    -
    - -
  • - -
  • - :expires_in - (FixNum, String) - - - — default: - nil - - - - —

    the number of seconds in which the AccessToken will expire

    -
    - -
  • - -
  • - :expires_at - (FixNum, String) - - - — default: - nil - - - - —

    the epoch time in seconds in which AccessToken will expire

    -
    - -
  • - -
  • - :expires_latency - (FixNum, String) - - - — default: - nil - - - - —

    the number of seconds by which AccessToken validity will be reduced to offset latency, @version 2.0+

    -
    - -
  • - -
  • - :mode - (Symbol, Hash, or callable) - - - — default: - :header - - - - —

    the transmission mode of the Access Token parameter value:
    -either one of :header, :body or :query; or a Hash with verb symbols as keys mapping to one of these symbols
    -(e.g., {get: :query, post: :header, delete: :header}); or a callable that accepts a request-verb parameter
    -and returns one of these three symbols.

    -
    - -
  • - -
  • - :header_format - (String) - - - — default: - 'Bearer %s' - - - - —

    the string format to use for the Authorization header

    -
    - -
  • - -
  • - :param_name - (String) - - - — default: - 'access_token' - - - - —

    the parameter name to use for transmission of the
    -Access Token value in :body or :query transmission mode

    -
    - -
  • - -
  • - :token_name - (String) - - - — default: - nil - - - - —

    the name of the response parameter that identifies the access token
    -When nil one of TOKEN_KEY_LOOKUP will be used

    -
    - -
  • - -
- - - -
- - - - -
-
-
-
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-
-
# File 'lib/oauth2/access_token.rb', line 148
-
-def initialize(client, token, opts = {})
-  @client = client
-  @token = token.to_s
-  opts = opts.dup
-  %i[refresh_token expires_in expires_at expires_latency].each do |arg|
-    instance_variable_set("@#{arg}", opts.delete(arg) || opts.delete(arg.to_s))
-  end
-  no_tokens = (@token.nil? || @token.empty?) && (@refresh_token.nil? || @refresh_token.empty?)
-  if no_tokens
-    if @client.options[:raise_errors]
-      raise Error.new({
-        error: "OAuth2::AccessToken has no token",
-        error_description: "Options are: #{opts.inspect}",
-      })
-    elsif !OAuth2.config.silence_no_tokens_warning
-      warn("OAuth2::AccessToken has no token")
-    end
-  end
-  # @option opts [Fixnum, String] :expires is deprecated
-  @expires_in ||= opts.delete("expires")
-  @expires_in &&= @expires_in.to_i
-  @expires_at &&= convert_expires_at(@expires_at)
-  @expires_latency &&= @expires_latency.to_i
-  @expires_at ||= Time.now.to_i + @expires_in if @expires_in && !@expires_in.zero?
-  @expires_at -= @expires_latency if @expires_latency
-  @options = {
-    mode: opts.delete(:mode) || :header,
-    header_format: opts.delete(:header_format) || "Bearer %s",
-    param_name: opts.delete(:param_name) || "access_token",
-  }
-  @options[:token_name] = opts.delete(:token_name) if opts.key?(:token_name)
-
-  @params = opts
-end
-
-
- -
- -
-

Instance Attribute Details

- - - -
-

- - #clientObject (readonly) - - - - - -

-
-

Returns the value of attribute client.

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/oauth2/access_token.rb', line 26
-
-def client
-  @client
-end
-
-
- - - -
-

- - #expires_atObject (readonly) - - - - - -

-
-

Returns the value of attribute expires_at.

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/oauth2/access_token.rb', line 26
-
-def expires_at
-  @expires_at
-end
-
-
- - - -
-

- - #expires_inObject (readonly) - - - - - -

-
-

Returns the value of attribute expires_in.

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/oauth2/access_token.rb', line 26
-
-def expires_in
-  @expires_in
-end
-
-
- - - -
-

- - #expires_latencyObject (readonly) - - - - - -

-
-

Returns the value of attribute expires_latency.

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/oauth2/access_token.rb', line 26
-
-def expires_latency
-  @expires_latency
-end
-
-
- - - -
-

- - #optionsObject - - - - - -

-
-

Returns the value of attribute options.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'lib/oauth2/access_token.rb', line 27
-
-def options
-  @options
-end
-
-
- - - -
-

- - #paramsObject (readonly) - - - - - -

-
-

Returns the value of attribute params.

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/oauth2/access_token.rb', line 26
-
-def params
-  @params
-end
-
-
- - - -
-

- - #refresh_tokenObject - - - - - -

-
-

Returns the value of attribute refresh_token.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'lib/oauth2/access_token.rb', line 27
-
-def refresh_token
-  @refresh_token
-end
-
-
- - - -
-

- - #responseObject - - - - - -

-
-

Returns the value of attribute response.

- - -
-
-
- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'lib/oauth2/access_token.rb', line 27
-
-def response
-  @response
-end
-
-
- - - -
-

- - #tokenObject (readonly) - - - - - -

-
-

Returns the value of attribute token.

- - -
-
-
- - -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/oauth2/access_token.rb', line 26
-
-def token
-  @token
-end
-
-
- -
- - -
-

Class Method Details

- - -
-

- - .from_hash(client, hash) ⇒ OAuth2::AccessToken - - - - - -

-
- -
- Note: -

The method will use the first found token key in the following order:
-‘access_token’, ‘id_token’, ‘token’ (or their symbolic versions)

-
-
- -
- Note: -

If multiple token keys are present, a warning will be issued unless
-OAuth2.config.silence_extra_tokens_warning is true

-
-
- -
- Note: -

If no token keys are present, a warning will be issued unless
-OAuth2.config.silence_no_tokens_warning is true

-
-
- -
- Note: -

For “soon-to-expire”/”clock-skew” functionality see the :expires_latency option.

-
-
- -
- Note: -

If snaky key conversion is being used, token_name needs to match the converted key.

-
-
- -

Initializes an AccessToken from a Hash

- - -
-
-
- -
-

Examples:

- - -
hash = { 'access_token' => 'token_value', 'refresh_token' => 'refresh_value' }
-access_token = OAuth2::AccessToken.from_hash(client, hash)
- -
-

Parameters:

-
    - -
  • - - client - - - (OAuth2::Client) - - - - — -

    the OAuth2::Client instance

    -
    - -
  • - -
  • - - hash - - - (Hash) - - - - — -

    a hash containing the token and other properties

    -
    - -
  • - -
- - - - - - -

Options Hash (hash):

-
    - -
  • - 'access_token' - (String) - - - - - —

    the access token value

    -
    - -
  • - -
  • - 'id_token' - (String) - - - - - —

    alternative key for the access token value

    -
    - -
  • - -
  • - 'token' - (String) - - - - - —

    alternative key for the access token value

    -
    - -
  • - -
  • - 'refresh_token' - (String) - - - — default: - optional - - - - —

    the refresh token value

    -
    - -
  • - -
  • - 'expires_in' - (Integer, String) - - - — default: - optional - - - - —

    number of seconds until token expires

    -
    - -
  • - -
  • - 'expires_at' - (Integer, String) - - - — default: - optional - - - - —

    epoch time in seconds when token expires

    -
    - -
  • - -
  • - 'expires_latency' - (Integer, String) - - - — default: - optional - - - - —

    seconds to reduce token validity by

    -
    - -
  • - -
- - -

Returns:

- - -
- - - - -
-
-
-
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-
-
# File 'lib/oauth2/access_token.rb', line 57
-
-def from_hash(client, hash)
-  fresh = hash.dup
-  # If token_name is present, then use that key name
-  key =
-    if fresh.key?(:token_name)
-      t_key = fresh[:token_name]
-      no_tokens_warning(fresh, t_key)
-      t_key
-    else
-      # Otherwise, if one of the supported default keys is present, use whichever has precedence
-      supported_keys = TOKEN_KEY_LOOKUP & fresh.keys
-      t_key = supported_keys[0]
-      extra_tokens_warning(supported_keys, t_key)
-      t_key
-    end
-  # :nocov:
-  # TODO: Get rid of this branching logic when dropping Hashie < v3.2
-  token = if !defined?(Hashie::VERSION) # i.e. <= "1.1.0"; the first Hashie to ship with a VERSION constant
-    warn("snaky_hash and oauth2 will drop support for Hashie v0 in the next major version. Please upgrade to a modern Hashie.")
-    # There is a bug in Hashie v0, which is accounts for.
-    fresh.delete(key) || fresh[key] || ""
-  else
-    fresh.delete(key) || ""
-  end
-  # :nocov:
-  new(client, token, fresh)
-end
-
-
- -
-

- - .from_kvform(client, kvform) ⇒ AccessToken - - - - - -

-
-

Initializes an AccessToken from a key/value application/x-www-form-urlencoded string

- - -
-
-
-

Parameters:

-
    - -
  • - - client - - - (Client) - - - - — -

    the OAuth2::Client instance

    -
    - -
  • - -
  • - - kvform - - - (String) - - - - — -

    the application/x-www-form-urlencoded string

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (AccessToken) - - - - — -

    the initialized AccessToken

    -
    - -
  • - -
- -
- - - - -
-
-
-
-90
-91
-92
-
-
# File 'lib/oauth2/access_token.rb', line 90
-
-def from_kvform(client, kvform)
-  from_hash(client, Rack::Utils.parse_query(kvform))
-end
-
-
- -
- -
-

Instance Method Details

- - -
-

- - #[](key) ⇒ Object - - - - - -

-
-

Indexer to additional params present in token response

- - -
-
-
-

Parameters:

-
    - -
  • - - key - - - (String) - - - - — -

    entry key to Hash

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-186
-187
-188
-
-
# File 'lib/oauth2/access_token.rb', line 186
-
-def [](key)
-  @params[key]
-end
-
-
- -
-

- - #delete(path, opts = {}, &block) ⇒ Object - - - - - -

-
-

Make a DELETE request with the Access Token

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-368
-369
-370
-
-
# File 'lib/oauth2/access_token.rb', line 368
-
-def delete(path, opts = {}, &block)
-  request(:delete, path, opts, &block)
-end
-
-
- -
-

- - #expired?Boolean - - - - - -

-
-

Check if token is expired

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -

    true if the token is expired, false otherwise

    -
    - -
  • - -
- -
- - - - -
-
-
-
-200
-201
-202
-
-
# File 'lib/oauth2/access_token.rb', line 200
-
-def expired?
-  expires? && (expires_at <= Time.now.to_i)
-end
-
-
- -
-

- - #expires?Boolean - - - - - -

-
-

Whether the token expires

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-193
-194
-195
-
-
# File 'lib/oauth2/access_token.rb', line 193
-
-def expires?
-  !!@expires_at
-end
-
-
- -
-

- - #get(path, opts = {}, &block) ⇒ Object - - - - - -

-
-

Make a GET request with the Access Token

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-340
-341
-342
-
-
# File 'lib/oauth2/access_token.rb', line 340
-
-def get(path, opts = {}, &block)
-  request(:get, path, opts, &block)
-end
-
-
- -
-

- - #headersObject - - - - - -

-
-

Get the headers hash (includes Authorization token)

- - -
-
-
- - -
- - - - -
-
-
-
-373
-374
-375
-
-
# File 'lib/oauth2/access_token.rb', line 373
-
-def headers
-  {"Authorization" => options[:header_format] % token}
-end
-
-
- -
-

- - #patch(path, opts = {}, &block) ⇒ Object - - - - - -

-
-

Make a PATCH request with the Access Token

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-361
-362
-363
-
-
# File 'lib/oauth2/access_token.rb', line 361
-
-def patch(path, opts = {}, &block)
-  request(:patch, path, opts, &block)
-end
-
-
- -
-

- - #post(path, opts = {}, &block) ⇒ Object - - - - - -

-
-

Make a POST request with the Access Token

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-347
-348
-349
-
-
# File 'lib/oauth2/access_token.rb', line 347
-
-def post(path, opts = {}, &block)
-  request(:post, path, opts, &block)
-end
-
-
- -
-

- - #put(path, opts = {}, &block) ⇒ Object - - - - - -

-
-

Make a PUT request with the Access Token

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-354
-355
-356
-
-
# File 'lib/oauth2/access_token.rb', line 354
-
-def put(path, opts = {}, &block)
-  request(:put, path, opts, &block)
-end
-
-
- -
-

- - #refresh(params = {}, access_token_opts = {}) {|opts| ... } ⇒ OAuth2::AccessToken - - - - Also known as: - refresh! - - - - -

-
- -
- Note: -

current token’s options are carried over to the new AccessToken

-
-
- -

Refreshes the current Access Token

- - -
-
-
-

Parameters:

-
    - -
  • - - params - - - (Hash) - - - (defaults to: {}) - - - — -

    additional params to pass to the refresh token request

    -
    - -
  • - -
  • - - access_token_opts - - - (Hash) - - - (defaults to: {}) - - - — -

    options that will be passed to the AccessToken initialization

    -
    - -
  • - -
- -

Yields:

-
    - -
  • - - - (opts) - - - - — -

    The block to modify the refresh token request options

    -
    - -
  • - -
-

Yield Parameters:

-
    - -
  • - - opts - - - (Hash) - - - - — -

    The options hash that can be modified

    -
    - -
  • - -
-

Returns:

- -

Raises:

- - -
- - - - -
-
-
-
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-
-
# File 'lib/oauth2/access_token.rb', line 215
-
-def refresh(params = {}, access_token_opts = {}, &block)
-  raise OAuth2::Error.new({error: "A refresh_token is not available"}) unless refresh_token
-
-  params[:grant_type] = "refresh_token"
-  params[:refresh_token] = refresh_token
-  new_token = @client.get_token(params, access_token_opts, &block)
-  new_token.options = options
-  if new_token.refresh_token
-    # Keep it if there is one
-  else
-    new_token.refresh_token = refresh_token
-  end
-  new_token
-end
-
-
- -
-

- - #request(verb, path, opts = {}) {|req| ... } ⇒ OAuth2::Response - - - - - -

-
-

Make a request with the Access Token

- - -
-
-
-

Parameters:

-
    - -
  • - - verb - - - (Symbol) - - - - — -

    the HTTP request method

    -
    - -
  • - -
  • - - path - - - (String) - - - - — -

    the HTTP URL path of the request

    -
    - -
  • - -
  • - - opts - - - (Hash) - - - (defaults to: {}) - - - — -

    the options to make the request with

    -
    - -
  • - -
- - - - - - - - -

Options Hash (opts):

-
    - -
  • - :params - (Hash) - - - - - —

    additional URL parameters

    -
    - -
  • - -
  • - :body - (Hash, String) - - - - - —

    the request body

    -
    - -
  • - -
  • - :headers - (Hash) - - - - - —

    request headers

    -
    - -
  • - -
- - -

Yields:

-
    - -
  • - - - (req) - - - - — -

    The block to modify the request

    -
    - -
  • - -
-

Yield Parameters:

-
    - -
  • - - req - - - (Faraday::Request) - - - - — -

    The request object that can be modified

    -
    - -
  • - -
-

Returns:

-
    - -
  • - - - (OAuth2::Response) - - - - — -

    the response from the request

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-332
-333
-334
-335
-
-
# File 'lib/oauth2/access_token.rb', line 332
-
-def request(verb, path, opts = {}, &block)
-  configure_authentication!(opts, verb)
-  @client.request(verb, path, opts, &block)
-end
-
-
- -
-

- - #revoke(params = {}) {|req| ... } ⇒ OAuth2::Response - - - - Also known as: - revoke! - - - - -

-
- -
- Note: -

If the token passed to the request
-is an access token, the server MAY revoke the respective refresh
-token as well.

-
-
- -
- Note: -

If the token passed to the request
-is a refresh token and the authorization server supports the
-revocation of access tokens, then the authorization server SHOULD
-also invalidate all access tokens based on the same authorization
-grant

-
-
- -
- Note: -

If the server responds with HTTP status code 503, your code must
-assume the token still exists and may retry after a reasonable delay.
-The server may include a “Retry-After” header in the response to
-indicate how long the service is expected to be unavailable to the
-requesting client.

-
-
- -

Revokes the token at the authorization server

- - -
-
-
-

Parameters:

-
    - -
  • - - params - - - (Hash) - - - (defaults to: {}) - - - — -

    additional parameters to be sent during revocation

    -
    - -
  • - -
- - - - -

Options Hash (params):

-
    - -
  • - :token_type_hint - (String, Symbol, nil) - - - — default: - 'access_token' or 'refresh_token' - - - - —

    hint about which token to revoke

    -
    - -
  • - -
  • - :token_method - (Symbol) - - - — default: - :post_with_query_string - - - - —

    overrides OAuth2::Client#options[:token_method]

    -
    - -
  • - -
- - -

Yields:

-
    - -
  • - - - (req) - - - - — -

    The block is passed the request being made, allowing customization

    -
    - -
  • - -
-

Yield Parameters:

-
    - -
  • - - req - - - (Faraday::Request) - - - - — -

    The request object that can be modified

    -
    - -
  • - -
-

Returns:

- -

Raises:

-
    - -
  • - - - (OAuth2::Error) - - - - — -

    if token_type_hint is invalid or the specified token is not available

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-264
-265
-266
-267
-268
-269
-270
-271
-272
-273
-274
-275
-276
-277
-278
-279
-280
-281
-282
-283
-284
-285
-286
-287
-288
-
-
# File 'lib/oauth2/access_token.rb', line 264
-
-def revoke(params = {}, &block)
-  token_type_hint_orig = params.delete(:token_type_hint)
-  token_type_hint = nil
-  revoke_token = case token_type_hint_orig
-  when "access_token", :access_token
-    token_type_hint = "access_token"
-    token
-  when "refresh_token", :refresh_token
-    token_type_hint = "refresh_token"
-    refresh_token
-  when nil
-    if token
-      token_type_hint = "access_token"
-      token
-    elsif refresh_token
-      token_type_hint = "refresh_token"
-      refresh_token
-    end
-  else
-    raise OAuth2::Error.new({error: "token_type_hint must be one of [nil, :refresh_token, :access_token], so if you need something else consider using a subclass or entirely custom AccessToken class."})
-  end
-  raise OAuth2::Error.new({error: "#{token_type_hint || "unknown token type"} is not available for revoking"}) unless revoke_token && !revoke_token.empty?
-
-  @client.revoke_token(revoke_token, token_type_hint, params, &block)
-end
-
-
- -
-

- - #to_hashHash - - - - - -

-
- -
- Note: -

Don’t return expires_latency because it has already been deducted from expires_at

-
-
- -

Convert AccessToken to a hash which can be used to rebuild itself with AccessToken.from_hash

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - - — -

    a hash of AccessToken property values

    -
    - -
  • - -
- -
- - - - -
-
-
-
-298
-299
-300
-301
-302
-303
-304
-305
-306
-307
-308
-309
-310
-311
-312
-313
-314
-315
-
-
# File 'lib/oauth2/access_token.rb', line 298
-
-def to_hash
-  hsh = {
-    access_token: token,
-    refresh_token: refresh_token,
-    expires_at: expires_at,
-    mode: options[:mode],
-    header_format: options[:header_format],
-    param_name: options[:param_name],
-  }
-  hsh[:token_name] = options[:token_name] if options.key?(:token_name)
-  # TODO: Switch when dropping Ruby < 2.5 support
-  # params.transform_keys(&:to_sym) # Ruby 2.5 only
-  # Old Ruby transform_keys alternative:
-  sheesh = @params.each_with_object({}) { |(k, v), memo|
-    memo[k.to_sym] = v
-  }
-  sheesh.merge(hsh)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OAuth2/FilteredAttributes/ClassMethods.html b/docs/OAuth2/FilteredAttributes/ClassMethods.html index c37b47e7..e69de29b 100644 --- a/docs/OAuth2/FilteredAttributes/ClassMethods.html +++ b/docs/OAuth2/FilteredAttributes/ClassMethods.html @@ -1,290 +0,0 @@ - - - - - - - Module: OAuth2::FilteredAttributes::ClassMethods - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
- - -

Module: OAuth2::FilteredAttributes::ClassMethods - - - -

-
- - - - - - - - - - - -
-
Defined in:
-
lib/oauth2/filtered_attributes.rb
-
- -
- -

Overview

-
-

Class-level helpers for configuring filtered attributes.

- - -
-
-
- - -
- - - - - - - -

- Instance Method Summary - collapse -

- - - - - - -
-

Instance Method Details

- - -
-

- - #filtered_attribute_namesArray<Symbol> - - - - - -

-
-

The configured attribute names to filter.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array<Symbol>) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'lib/oauth2/filtered_attributes.rb', line 30
-
-def filtered_attribute_names
-  @filtered_attribute_names || []
-end
-
-
- -
-

- - #filtered_attributes(*attributes) ⇒ void - - - - - -

-
-

This method returns an undefined value.

Declare attributes that should be redacted in inspect output.

- - -
-
-
-

Parameters:

-
    - -
  • - - attributes - - - (Array<Symbol, String>) - - - - — -

    One or more attribute names

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/oauth2/filtered_attributes.rb', line 23
-
-def filtered_attributes(*attributes)
-  @filtered_attribute_names = attributes.map(&:to_sym)
-end
-
-
- -
- -
- - - -
- - \ No newline at end of file diff --git a/docs/OAuth2/Response.html b/docs/OAuth2/Response.html index 388127f3..e69de29b 100644 --- a/docs/OAuth2/Response.html +++ b/docs/OAuth2/Response.html @@ -1,367 +0,0 @@ - - - - - - - Class: OAuth2::Response - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - -
- - -

Class: OAuth2::Response - - - -

-
- -
-
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
-
- - - - - - - - - - - -
-
Defined in:
-
lib/oauth2/response.rb
-
- -
- -

Overview

-
-

The Response class handles HTTP responses in the OAuth2 gem, providing methods
-to access and parse response data in various formats.

- - -
-
-
- -

Since:

-
    - -
  • - - - - - -

    1.0.0

    -
    - -
  • - -
- -
- -

- Constant Summary - collapse -

- -
- -
DEFAULT_OPTIONS = -
-
-

Default configuration options for Response instances

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash) - - - - — -

    The default options hash

    -
    - -
  • - -
-

Since:

-
    - -
  • - - - - - -

    1.0.0

    -
    - -
  • - -
- -
-
-
{
-  parse: :automatic,
-  snaky: true,
-  snaky_hash_klass: SnakyHash::StringKeyed,
-}.freeze
- -
@@parsers = -
-
-

Storage for response body parser procedures

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash<Symbol, Proc>) - - - - — -

    Hash of parser procs keyed by format symbol

    -
    - -
  • - -
-

Since:

-
    - -
  • - - - - - -

    1.0.0

    -
    - -
  • - -
- -
-
-
{
-  query: ->(body) { Rack::Utils.parse_query(body) },
-  text: ->(body) { body },
-}
- -
@@content_types = -
-
-

Maps content types to parser symbols

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Hash<String, Symbol>) - - - - — -

    Hash of content types mapped to parser symbols

    -
    - -
  • - -
-

Since:

-
    - -
  • - - - - - -

    1.0.0

    -
    - -
  • - -
- -
-
-
{
-  "application/x-www-form-urlencoded" => :query,
-  "text/plain" => :text,
-}
- -
- - - - - -

Instance Attribute Summary collapse

- - - - - - -

- Class Method Summary - collapse -

- -