saml_idp_metadata 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25ee0d1fbffc9f7b9d90b8f7cd77184c32a1b1553c2eacaa9043ec38dfc1637b
4
- data.tar.gz: eb305a057b311d2911f190755146d826a49c5e773a210869bd2c91f53e1fa1ef
3
+ metadata.gz: c6bd6e1fcb0dcaad25999f46a36863538467613ae69ff577c58ca4640465c24e
4
+ data.tar.gz: 43fbe8571133e8d31c36f058da67fbe4c264faa6841272b70d92e0ee11bdfc59
5
5
  SHA512:
6
- metadata.gz: def7d9667ccefa93a7ca0aa165aaff16b2cb396df318c67e7a74eb8da9e8c4f25399a5b5a702f7c12b06d065fb8b29cd6c0578e4db27e23648fa112fe6f8bedc
7
- data.tar.gz: 2fad91dfd407ecd01e6a3325130fc5bdeb925e9cc73b6e69304fd8a8cc9d73c531fe4599041954e9ac057361cdc202046b2affa5c7a43e21f75ba66e2d0844c4
6
+ metadata.gz: 8ced85c46f92e62885bbf4f64dd16cf446dbde8e650521bd611acf7a2f0460272c800dc4d16c0d7d146432e2b3c2e3a2802acfb72be44bab87473ddb3bc22f70
7
+ data.tar.gz: fb67c611f477419025067cb23cd9d8160c1d43434157a982e095b3998f689a4a03f8e778a6287d403fde43897f49486b6f8058f093d12a13da1e42651ad81d5a
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-08-06 01:31:39 UTC using RuboCop version 0.89.0.
3
+ # on 2021-01-21 06:10:48 UTC using RuboCop version 1.8.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -14,17 +14,17 @@ Gemspec/RequiredRubyVersion:
14
14
  - 'saml_idp_metadata.gemspec'
15
15
 
16
16
  # Offense count: 1
17
- # Configuration parameters: IgnoredMethods.
17
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
18
18
  Metrics/AbcSize:
19
19
  Max: 21
20
20
 
21
- # Offense count: 3
22
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
23
- # ExcludedMethods: refine
21
+ # Offense count: 4
22
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
23
+ # IgnoredMethods: refine
24
24
  Metrics/BlockLength:
25
- Max: 230
25
+ Max: 267
26
26
 
27
- # Offense count: 14
27
+ # Offense count: 17
28
28
  # Cop supports --auto-correct.
29
29
  # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
30
30
  # URISchemes: http, https
@@ -1,5 +1,57 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.2.0](https://github.com/tknzk/saml_idp_metadata/tree/v0.2.0) (2021-01-21)
4
+
5
+ [Full Changelog](https://github.com/tknzk/saml_idp_metadata/compare/v0.1.9...v0.2.0)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - bumpup 0.2.0 [\#174](https://github.com/tknzk/saml_idp_metadata/pull/174) ([tknzk](https://github.com/tknzk))
10
+ - Require ruby version [\#173](https://github.com/tknzk/saml_idp_metadata/pull/173) ([tknzk](https://github.com/tknzk))
11
+ - Bump docile from 1.3.4 to 1.3.5 [\#172](https://github.com/tknzk/saml_idp_metadata/pull/172) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
12
+ - Bump simplecov from 0.21.1 to 0.21.2 [\#171](https://github.com/tknzk/saml_idp_metadata/pull/171) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
13
+ - Bump rubocop from 1.8.0 to 1.8.1 [\#170](https://github.com/tknzk/saml_idp_metadata/pull/170) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
14
+ - Bump activesupport from 6.1.0 to 6.1.1 [\#169](https://github.com/tknzk/saml_idp_metadata/pull/169) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
15
+ - Bump rubocop from 1.7.0 to 1.8.0 [\#168](https://github.com/tknzk/saml_idp_metadata/pull/168) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
16
+ - Bump minitest from 5.14.2 to 5.14.3 [\#167](https://github.com/tknzk/saml_idp_metadata/pull/167) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
17
+ - Bump rubocop-ast from 1.3.0 to 1.4.0 [\#166](https://github.com/tknzk/saml_idp_metadata/pull/166) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
18
+ - Bump simplecov from 0.20.0 to 0.21.1 [\#165](https://github.com/tknzk/saml_idp_metadata/pull/165) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
19
+ - Bump i18n from 1.8.5 to 1.8.7 [\#164](https://github.com/tknzk/saml_idp_metadata/pull/164) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
20
+ - Bump ruby-progressbar from 1.10.1 to 1.11.0 [\#163](https://github.com/tknzk/saml_idp_metadata/pull/163) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
21
+ - Bump rspec-mocks from 3.10.0 to 3.10.1 [\#161](https://github.com/tknzk/saml_idp_metadata/pull/161) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
22
+ - Bump rspec-expectations from 3.10.0 to 3.10.1 [\#160](https://github.com/tknzk/saml_idp_metadata/pull/160) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
23
+ - Bump rspec-core from 3.10.0 to 3.10.1 [\#159](https://github.com/tknzk/saml_idp_metadata/pull/159) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
24
+ - Bump regexp\_parser from 2.0.1 to 2.0.3 [\#158](https://github.com/tknzk/saml_idp_metadata/pull/158) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
25
+ - Bump rubocop from 1.6.1 to 1.7.0 [\#157](https://github.com/tknzk/saml_idp_metadata/pull/157) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
26
+ - 💎 Ruby 3.0.0 [\#155](https://github.com/tknzk/saml_idp_metadata/pull/155) ([tknzk](https://github.com/tknzk))
27
+ - 3.0.0 preview2, 3.0.0-rc1 [\#154](https://github.com/tknzk/saml_idp_metadata/pull/154) ([tknzk](https://github.com/tknzk))
28
+ - Bump docile from 1.3.3 to 1.3.4 [\#153](https://github.com/tknzk/saml_idp_metadata/pull/153) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
29
+ - Bump regexp\_parser from 2.0.0 to 2.0.1 [\#152](https://github.com/tknzk/saml_idp_metadata/pull/152) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
30
+ - Bump rake from 13.0.1 to 13.0.3 [\#151](https://github.com/tknzk/saml_idp_metadata/pull/151) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
31
+ - Bump docile from 1.3.2 to 1.3.3 [\#150](https://github.com/tknzk/saml_idp_metadata/pull/150) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
32
+ - Bump tzinfo from 2.0.3 to 2.0.4 [\#149](https://github.com/tknzk/saml_idp_metadata/pull/149) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
33
+ - Bump rubocop from 1.6.0 to 1.6.1 [\#147](https://github.com/tknzk/saml_idp_metadata/pull/147) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
34
+ - add require 'active\_support/dependencies/autoload' [\#146](https://github.com/tknzk/saml_idp_metadata/pull/146) ([tknzk](https://github.com/tknzk))
35
+ - Bump rubocop from 1.5.2 to 1.6.0 [\#145](https://github.com/tknzk/saml_idp_metadata/pull/145) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
36
+ - Bump activesupport from 6.0.3.4 to 6.1.0 [\#143](https://github.com/tknzk/saml_idp_metadata/pull/143) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
37
+ - Bump rubocop from 1.5.1 to 1.5.2 [\#142](https://github.com/tknzk/saml_idp_metadata/pull/142) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
38
+ - Bump rubocop from 1.5.0 to 1.5.1 [\#141](https://github.com/tknzk/saml_idp_metadata/pull/141) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
39
+ - Bump rubocop-ast from 1.2.0 to 1.3.0 [\#140](https://github.com/tknzk/saml_idp_metadata/pull/140) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
40
+ - Bump rubocop from 1.4.2 to 1.5.0 [\#139](https://github.com/tknzk/saml_idp_metadata/pull/139) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
41
+ - Bump simplecov from 0.19.1 to 0.20.0 [\#138](https://github.com/tknzk/saml_idp_metadata/pull/138) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
42
+ - Bump zeitwerk from 2.4.1 to 2.4.2 [\#137](https://github.com/tknzk/saml_idp_metadata/pull/137) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
43
+ - Bump rubocop from 1.4.1 to 1.4.2 [\#136](https://github.com/tknzk/saml_idp_metadata/pull/136) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
44
+ - Bump regexp\_parser from 1.8.2 to 2.0.0 [\#135](https://github.com/tknzk/saml_idp_metadata/pull/135) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
45
+ - Bump rubocop-ast from 1.1.1 to 1.2.0 [\#134](https://github.com/tknzk/saml_idp_metadata/pull/134) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
46
+ - Bump parallel from 1.20.0 to 1.20.1 [\#133](https://github.com/tknzk/saml_idp_metadata/pull/133) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
47
+ - Bump rubocop from 1.3.1 to 1.4.1 [\#132](https://github.com/tknzk/saml_idp_metadata/pull/132) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
48
+ - Bump rubocop from 1.3.0 to 1.3.1 [\#131](https://github.com/tknzk/saml_idp_metadata/pull/131) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
49
+ - Bump rubocop from 1.2.0 to 1.3.0 [\#130](https://github.com/tknzk/saml_idp_metadata/pull/130) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
50
+ - Bump tzinfo from 1.2.7 to 1.2.8 [\#129](https://github.com/tknzk/saml_idp_metadata/pull/129) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
51
+ - Bump parallel from 1.19.2 to 1.20.0 [\#128](https://github.com/tknzk/saml_idp_metadata/pull/128) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
52
+ - Bump rubocop from 1.1.0 to 1.2.0 [\#127](https://github.com/tknzk/saml_idp_metadata/pull/127) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
53
+ - Bump rubocop-ast from 1.1.0 to 1.1.1 [\#126](https://github.com/tknzk/saml_idp_metadata/pull/126) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
54
+
3
55
  ## [v0.1.9](https://github.com/tknzk/saml_idp_metadata/tree/v0.1.9) (2020-11-02)
4
56
 
5
57
  [Full Changelog](https://github.com/tknzk/saml_idp_metadata/compare/v0.1.8...v0.1.9)
@@ -31,8 +83,6 @@
31
83
  - Bump rubocop from 0.91.1 to 0.92.0 [\#102](https://github.com/tknzk/saml_idp_metadata/pull/102) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
32
84
  - Bump rubocop-ast from 0.4.2 to 0.5.0 [\#101](https://github.com/tknzk/saml_idp_metadata/pull/101) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
33
85
  - Bump rubocop from 0.91.0 to 0.91.1 [\#99](https://github.com/tknzk/saml_idp_metadata/pull/99) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
34
- - Bump simplecov-html from 0.12.2 to 0.12.3 [\#98](https://github.com/tknzk/saml_idp_metadata/pull/98) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
35
- - Bump regexp\_parser from 1.7.1 to 1.8.0 [\#97](https://github.com/tknzk/saml_idp_metadata/pull/97) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
36
86
  - Bump rubocop-ast from 0.4.1 to 0.4.2 [\#96](https://github.com/tknzk/saml_idp_metadata/pull/96) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
37
87
  - Bump rubocop-ast from 0.4.0 to 0.4.1 [\#95](https://github.com/tknzk/saml_idp_metadata/pull/95) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
38
88
  - Bump rubocop from 0.90.0 to 0.91.0 [\#94](https://github.com/tknzk/saml_idp_metadata/pull/94) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
@@ -44,6 +94,8 @@
44
94
 
45
95
  **Merged pull requests:**
46
96
 
97
+ - Bump simplecov-html from 0.12.2 to 0.12.3 [\#98](https://github.com/tknzk/saml_idp_metadata/pull/98) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
98
+ - Bump regexp\_parser from 1.7.1 to 1.8.0 [\#97](https://github.com/tknzk/saml_idp_metadata/pull/97) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
47
99
  - bumpup [\#92](https://github.com/tknzk/saml_idp_metadata/pull/92) ([tknzk](https://github.com/tknzk))
48
100
  - Bump activesupport from 6.0.3.2 to 6.0.3.3 [\#91](https://github.com/tknzk/saml_idp_metadata/pull/91) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
49
101
  - Bump minitest from 5.14.1 to 5.14.2 [\#90](https://github.com/tknzk/saml_idp_metadata/pull/90) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
@@ -139,7 +191,6 @@
139
191
  - Bump unicode-display\_width from 1.6.0 to 1.6.1 [\#23](https://github.com/tknzk/saml_idp_metadata/pull/23) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
140
192
  - Bump minitest from 5.13.0 to 5.14.0 [\#22](https://github.com/tknzk/saml_idp_metadata/pull/22) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
141
193
  - update changelog [\#21](https://github.com/tknzk/saml_idp_metadata/pull/21) ([tknzk](https://github.com/tknzk))
142
- - Modified GitHub workflow [\#16](https://github.com/tknzk/saml_idp_metadata/pull/16) ([tknzk](https://github.com/tknzk))
143
194
 
144
195
  ## [v0.1.4](https://github.com/tknzk/saml_idp_metadata/tree/v0.1.4) (2020-01-11)
145
196
 
@@ -151,6 +202,7 @@
151
202
  - bundle update [\#19](https://github.com/tknzk/saml_idp_metadata/pull/19) ([tknzk](https://github.com/tknzk))
152
203
  - fix working\_dir [\#18](https://github.com/tknzk/saml_idp_metadata/pull/18) ([tknzk](https://github.com/tknzk))
153
204
  - add build status badge [\#17](https://github.com/tknzk/saml_idp_metadata/pull/17) ([tknzk](https://github.com/tknzk))
205
+ - Modified GitHub workflow [\#16](https://github.com/tknzk/saml_idp_metadata/pull/16) ([tknzk](https://github.com/tknzk))
154
206
  - Modified circleci config [\#15](https://github.com/tknzk/saml_idp_metadata/pull/15) ([tknzk](https://github.com/tknzk))
155
207
  - Bump rubocop from 0.78.0 to 0.79.0 [\#14](https://github.com/tknzk/saml_idp_metadata/pull/14) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
156
208
  - rename [\#13](https://github.com/tknzk/saml_idp_metadata/pull/13) ([tknzk](https://github.com/tknzk))
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- saml_idp_metadata (0.2.0)
4
+ saml_idp_metadata (0.2.1)
5
5
  activesupport
6
6
 
7
7
  GEM
@@ -15,7 +15,7 @@ GEM
15
15
  zeitwerk (~> 2.3)
16
16
  ast (2.4.1)
17
17
  coderay (1.1.3)
18
- concurrent-ruby (1.1.7)
18
+ concurrent-ruby (1.1.8)
19
19
  diff-lcs (1.4.4)
20
20
  docile (1.3.5)
21
21
  i18n (1.8.7)
@@ -8,7 +8,8 @@ module SamlIdpMetadata
8
8
  # SAML IdP metadata parser
9
9
  #
10
10
  class Parser
11
- attr_reader :xml, :xmlns, :entity_id, :sso_http_redirect_url, :sso_http_post_url, :slo_url, :x509_certificate
11
+ attr_reader :xml, :xmlns, :entity_id, :sso_http_redirect_url, :sso_http_post_url, :slo_url, :nameid_format,
12
+ :x509_certificate
12
13
 
13
14
  def initialize(xml:)
14
15
  @xml = xml
@@ -19,6 +20,7 @@ module SamlIdpMetadata
19
20
  @sso_http_redirect_url = nil
20
21
  @sso_http_post_url = nil
21
22
  @slo_url = nil
23
+ @nameid_format = nil
22
24
  @x509_certificate = nil
23
25
  end
24
26
 
@@ -33,6 +35,7 @@ module SamlIdpMetadata
33
35
  @sso_http_redirect_url = parse_sso_http_redirect_url
34
36
  @sso_http_post_url = parse_sso_http_post_url
35
37
  @slo_url = parse_slo_url
38
+ @nameid_format = parse_nameid_format
36
39
  @x509_certificate = parse_x509_certificate
37
40
 
38
41
  self
@@ -53,6 +56,7 @@ module SamlIdpMetadata
53
56
  sso_http_post_url: sso_http_post_url,
54
57
  certificate: x509_certificate,
55
58
  slo_url: slo_url,
59
+ nameid_format: nameid_format,
56
60
  metadata: xml
57
61
  }
58
62
  end
@@ -107,6 +111,16 @@ module SamlIdpMetadata
107
111
  end
108
112
  end
109
113
 
114
+ def parse_nameid_format
115
+ return nil if entity_descriptor.dig('IDPSSODescriptor', 'NameIDFormat').nil?
116
+
117
+ if entity_descriptor['IDPSSODescriptor']['NameIDFormat'].instance_of?(Array)
118
+ entity_descriptor['IDPSSODescriptor']['NameIDFormat'].last
119
+ else
120
+ entity_descriptor['IDPSSODescriptor']['NameIDFormat']
121
+ end
122
+ end
123
+
110
124
  def parse_x509_certificate
111
125
  return nil if entity_descriptor.dig('IDPSSODescriptor', 'KeyDescriptor').nil?
112
126
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SamlIdpMetadata
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml_idp_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - tknzk