omniauth-line-v2_1 1.0.0 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4daab37331c6e52d1d1ee084436b0e657c911d1aabaaeab22082c67d54fb02a7
4
- data.tar.gz: 0e14607b895b14419ff4c805cf0f4669b7f0e1778a4b1c6b074a01de69bc1d39
3
+ metadata.gz: 32152b111920b320e068b3038339245e0a7f8b7bf3b42481b07f33276a770afb
4
+ data.tar.gz: 9424e8c32ba957214cb9583ab3c094544d0cc0500a26b4b425330775e840401c
5
5
  SHA512:
6
- metadata.gz: 0dbb8a42057f34f02182d549ee477ea3125e53496a4849bb8549d335d40b3c38509c77addeab62fc382f564d8bd2667c967791455af52749e9160cd14379e551
7
- data.tar.gz: a9d34cbeb50f3dc972fefadd63a5e3b683f7355c300c382663bd47dca4c7891f775a5f59f88718f6499c231907e6152fde2c9761450bd9fdb7803ae327432803
6
+ metadata.gz: 96b6264a13cbd4e4a9645dcd57ca1e9a0403d04989654b65beab55568f72ac17e2ecfc1631895622b56b311c2c46d1e420728789a3781d06526e8355bb1d7629
7
+ data.tar.gz: f9cbd122a9ca71a835f0c4bb3c48e157a75c7164e283efbac7df689a02d9473b94b554a2c8065e3da3e6b3f04308424a7daedca65efd93c96113d8871a461264
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.0] - 2025-08-02
4
+
5
+ - Refactor: Refactor `OmniAuth::Strategies::LineV21#authorize_params`
6
+ - Test: Update test
7
+
3
8
  ## [1.0.0] - 2025-08-01
4
9
 
5
10
  - New: Generate nonce parameter automatically for security
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module LineV21
5
- VERSION = '1.0.0'
5
+ VERSION = '1.1.0'
6
6
  end
7
7
  end
@@ -56,16 +56,16 @@ module OmniAuth
56
56
  options[:redirect_uri] || (full_host + callback_path)
57
57
  end
58
58
 
59
- def authorize_params
59
+ def authorize_params # rubocop:disable Metrics/AbcSize
60
60
  super.tap do |params|
61
- %w[scope state nonce prompt bot_prompt].each do |v|
62
- params[v.to_sym] = request.params[v] if request.params[v]
61
+ options[:authorize_options].each do |key|
62
+ params[key] = request.params[key.to_s] unless empty?(request.params[key.to_s])
63
63
  end
64
64
  params[:scope] ||= DEFAULT_SCOPE
65
65
  params[:nonce] ||= SecureRandom.hex(24)
66
66
  params[:response_type] = 'code'
67
- session['omniauth.state'] = params[:state] if params[:state]
68
- session['omniauth.nonce'] = params[:nonce] if params[:nonce]
67
+ session['omniauth.state'] = params[:state] unless empty?(params[:state])
68
+ session['omniauth.nonce'] = params[:nonce] unless empty?(params[:nonce])
69
69
  end
70
70
  end
71
71
 
@@ -74,10 +74,14 @@ module OmniAuth
74
74
  def prune!(hash)
75
75
  hash.delete_if do |_, value|
76
76
  prune!(value) if value.is_a?(Hash)
77
- value.nil? || (value.respond_to?(:empty?) && value.empty?)
77
+ empty?(value)
78
78
  end
79
79
  end
80
80
 
81
+ def empty?(value)
82
+ value.nil? || (value.respond_to?(:empty?) && value.empty?)
83
+ end
84
+
81
85
  def id_token_info
82
86
  return @id_token_info if defined?(@id_token_info)
83
87
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-line-v2_1
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro
@@ -52,15 +52,15 @@ files:
52
52
  - lib/omniauth-line-v2_1.rb
53
53
  - lib/omniauth/line_v2_1/version.rb
54
54
  - lib/omniauth/strategies/line_v2_1.rb
55
- homepage: https://github.com/cadenza-tech/omniauth-line-v2_1/tree/v1.0.0
55
+ homepage: https://github.com/cadenza-tech/omniauth-line-v2_1/tree/v1.1.0
56
56
  licenses:
57
57
  - MIT
58
58
  metadata:
59
- homepage_uri: https://github.com/cadenza-tech/omniauth-line-v2_1/tree/v1.0.0
60
- source_code_uri: https://github.com/cadenza-tech/omniauth-line-v2_1/tree/v1.0.0
61
- changelog_uri: https://github.com/cadenza-tech/omniauth-line-v2_1/blob/v1.0.0/CHANGELOG.md
59
+ homepage_uri: https://github.com/cadenza-tech/omniauth-line-v2_1/tree/v1.1.0
60
+ source_code_uri: https://github.com/cadenza-tech/omniauth-line-v2_1/tree/v1.1.0
61
+ changelog_uri: https://github.com/cadenza-tech/omniauth-line-v2_1/blob/v1.1.0/CHANGELOG.md
62
62
  bug_tracker_uri: https://github.com/cadenza-tech/omniauth-line-v2_1/issues
63
- documentation_uri: https://rubydoc.info/gems/omniauth-line-v2_1/1.0.0
63
+ documentation_uri: https://rubydoc.info/gems/omniauth-line-v2_1/1.1.0
64
64
  funding_uri: https://patreon.com/CadenzaTech
65
65
  rubygems_mfa_required: 'true'
66
66
  rdoc_options: []