omniauth-cas 3.0.0 → 3.0.2

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: fd3e863e924ef181ec4a6bfdb1c64187258b78ffc8bd8857df7017607dc60a47
4
- data.tar.gz: 2dda8861195390b89ebaf60f74bd9e1985a44410abd91e7cc1a4608cd8cbaed9
3
+ metadata.gz: c081ab74fc1dca73df7c4a403c77714e378467d304f0bc461d63455944eee813
4
+ data.tar.gz: 13d48e3204d30d85b0d77a06cb0c9a4ae5e6a101075beef8f8cf9c781098305d
5
5
  SHA512:
6
- metadata.gz: 181b83703819f127f099eb14455a4160f71810f04fc1ce3886a87968efe801cb951c49613726b50f0408f7f4ce69a42d56f7d3be0a42f6b61cbdfaefcf76a015
7
- data.tar.gz: 45f2a3b3b3a3827c3fb57c2e537a3b21adf6c04f8e3d5b33cf981400602407c9d6b1c33f89145210c1b700f300d6cb0a0dc54fb8f06bcc3ac8fa614d8be3af1f
6
+ metadata.gz: ca58926494b20100c4fa7400fd2bf173a0bb6e932875d80d7b9e5c660fc6a7848cf965294a6e3e7eabec1504e667070400089b70157d5ad6a43818de7dd91cda
7
+ data.tar.gz: 4658cf8858bbc9571cf2497c93c413f6c86512ad1c2149d9bdd02c38bf384a39198274d408065f8d9b9cbbf67da74f1608638908c2514b7607e61d0bb239a594
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
6
6
  project adheres to [Semantic Versioning](https://semver.org/)
7
7
 
8
+ ## 3.0.2 - 2025-07-26
9
+
10
+ * Minor refactor to service ticket validator (#96).
11
+
12
+ ## 3.0.1 - 2025-02-28
13
+
14
+ * Prefer `require_relative` over `require`
15
+ * Remove redundant require of `net/https`
16
+
8
17
  ## 3.0.0 - 2024-02-24
9
18
 
10
19
  ### Changed
data/README.md CHANGED
@@ -98,7 +98,7 @@ provider :cas,
98
98
  service_validate_url: '/cas/serviceValidate'
99
99
  ```
100
100
 
101
- If you encounter problems wih SSL certificates you may want to set the `ca_path` parameter or activate `disable_ssl_verification` (not recommended).
101
+ If you encounter problems with SSL certificates you may want to set the `ca_path` parameter or activate `disable_ssl_verification` (not recommended).
102
102
 
103
103
  ## Contributing
104
104
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Cas
5
- VERSION = '3.0.0'
5
+ VERSION = '3.0.2'
6
6
  end
7
7
  end
data/lib/omniauth/cas.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'omniauth/cas/version'
4
- require 'omniauth/strategies/cas'
3
+ require_relative 'cas/version'
4
+ require_relative 'strategies/cas'
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'net/http'
4
- require 'net/https'
5
4
  require 'nokogiri'
6
5
 
7
6
  module OmniAuth
@@ -59,23 +58,22 @@ module OmniAuth
59
58
  def parse_user_info(node)
60
59
  return nil if node.nil?
61
60
 
62
- {}.tap do |hash|
63
- node.children.each do |e|
64
- node_name = e.name.sub(/^cas:/, '')
65
- unless e.is_a?(Nokogiri::XML::Text) || node_name == 'proxies'
66
- # There are no child elements
67
- if e.element_children.count == 0
68
- hash[node_name] = attribute_value(hash, node_name, e.content)
69
- elsif e.element_children.count
70
- # JASIG style extra attributes
71
- if node_name == 'attributes'
72
- hash.merge!(parse_user_info(e))
73
- else
74
- hash[node_name] = [] if hash[node_name].nil?
75
- hash[node_name].push(parse_user_info(e))
76
- end
61
+ node.children.each_with_object({}) do |e, hash|
62
+ node_name = e.name.sub(/^cas:/, '')
63
+ unless e.is_a?(Nokogiri::XML::Text) || node_name == 'proxies'
64
+ # rubocop:disable Style/IfInsideElse -- preserve `else` branch for clarity
65
+ if e.element_children.empty?
66
+ hash[node_name] = attribute_value(hash, node_name, e.content)
67
+ else
68
+ # JASIG style extra attributes
69
+ if node_name == 'attributes'
70
+ hash.merge!(parse_user_info(e))
71
+ else
72
+ hash[node_name] = [] if hash[node_name].nil?
73
+ hash[node_name].push(parse_user_info(e))
77
74
  end
78
75
  end
76
+ # rubocop:enable Style/IfInsideElse
79
77
  end
80
78
  end
81
79
  end
@@ -152,7 +152,7 @@ module OmniAuth
152
152
  # +service+ and add it and the +ticket+ as paraemters to the
153
153
  # CAS serviceValidate URL.
154
154
  #
155
- # @param [String] service the service (a.k.a. return-to) URL
155
+ # @param [String] service_url the service (a.k.a. return-to) URL
156
156
  # @param [String] ticket the ticket to validate
157
157
  #
158
158
  # @return [String] a URL like `http://cas.mycompany.com/serviceValidate?service=...&ticket=...`
data/lib/omniauth-cas.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'omniauth/cas'
3
+ require_relative 'omniauth/cas'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-cas
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Lindahl
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: addressable
@@ -78,7 +77,6 @@ metadata:
78
77
  rubygems_mfa_required: 'true'
79
78
  source_code_uri: https://github.com/dlindahl/omniauth-cas
80
79
  wiki_uri: https://github.com/dlindahl/omniauth-cas/wiki
81
- post_install_message:
82
80
  rdoc_options: []
83
81
  require_paths:
84
82
  - lib
@@ -93,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
91
  - !ruby/object:Gem::Version
94
92
  version: '0'
95
93
  requirements: []
96
- rubygems_version: 3.5.5
97
- signing_key:
94
+ rubygems_version: 3.6.9
98
95
  specification_version: 4
99
96
  summary: CAS Strategy for OmniAuth
100
97
  test_files: []