saml2 3.1.7 → 3.1.8

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: a42e449db5b187133933908703402c206e6970a461afe32c341ad415efc99c67
4
- data.tar.gz: 1eac4f4dd4da460143787f8462f858bd6dec41ed292661c0e3deb3ca6a3752d9
3
+ metadata.gz: 3815104786966a199c96c8773d8a9fe5c175c57174bcd0c86cd03eebe0f5f58d
4
+ data.tar.gz: 76a86567352e96c934c1e2b8fb253cd96170c4b9426b1c8e6866782a9133d393
5
5
  SHA512:
6
- metadata.gz: 9d465a94aa16d8c0f5b9376004d9ec7c2ad2aac4faddc015735a879c2e910fa7243d6b17d696dae155eebd59ea6468794feefb57a7eba991aa9ef3e75952ff67
7
- data.tar.gz: c70baefc40e426e0baddbac206bb4695c7b9c86ea2d0dc0ffcff5203070ab84beccb12420aeb0d062728cd2f966ede4574ec25341811e6930792f21a36a529a2
6
+ metadata.gz: 91f5d0eb2e8bd1d3601f48296f3e93d0c53781b68c5937eed2ed788370cc7ab26c27f0d0048d99b602e4ec36294e49fa00c1dea3c6008994973e7ee03d597f42
7
+ data.tar.gz: f1678da72de78bc55b4d34208288d43fae758931ab5c60bb7fbd74fd6f6f6fa6b0f665c22bf87903c7e1ecfc8aeba8e2e7aa50299cf41de940745c45875319ad
@@ -23,7 +23,7 @@ module SAML2
23
23
  # @return [Boolean, nil]
24
24
  attr_writer :force_authn, :passive
25
25
  # @return [RequestedAuthnContext, nil]
26
- attr_accessor :requested_authn_context
26
+ attr_writer :requested_authn_context
27
27
 
28
28
  # Initiate a SAML SSO flow, from a service provider to an identity
29
29
  # provider.
@@ -162,6 +162,14 @@ module SAML2
162
162
  @subject
163
163
  end
164
164
 
165
+ def requested_authn_context
166
+ if xml && !instance_variable_defined?(:@requested_authn_context)
167
+ @requested_authn_context = RequestedAuthnContext.from_xml(xml.at_xpath("samlp:RequestedAuthnContext",
168
+ Namespaces::ALL))
169
+ end
170
+ @requested_authn_context
171
+ end
172
+
165
173
  # (see Base#build)
166
174
  def build(builder)
167
175
  builder["samlp"].AuthnRequest(
@@ -9,6 +9,12 @@ module SAML2
9
9
  # @return [String, Array<String>]
10
10
  attr_accessor :class_ref
11
11
 
12
+ # (see Base#from_xml)
13
+ def from_xml(node)
14
+ super
15
+ @class_ref = load_string_array(node, "saml:AuthnContextClassRef")
16
+ end
17
+
12
18
  # (see Base#build)
13
19
  def build(builder)
14
20
  builder["samlp"].RequestedAuthnContext do |requested_authn_context|
data/lib/saml2/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SAML2
4
- VERSION = "3.1.7"
4
+ VERSION = "3.1.8"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.7
4
+ version: 3.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-08 00:00:00.000000000 Z
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  - !ruby/object:Gem::Version
245
245
  version: '0'
246
246
  requirements: []
247
- rubygems_version: 3.5.6
247
+ rubygems_version: 3.4.20
248
248
  signing_key:
249
249
  specification_version: 4
250
250
  summary: SAML 2.0 Library