libsaml 3.9.0 → 3.9.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: 2426d8b0b8d15224e07684bf9137716eefaeacf012f34b96c749bc8a61773efc
4
- data.tar.gz: 8f3ff2560d4a89cb82c03148fbe6876bddaf29976a2a6932e703aea3c688e834
3
+ metadata.gz: a6d2ed00b846de2e5bc324dfbcc6cb0128911b2d7d083db22ad6faf700120968
4
+ data.tar.gz: 41f666637953e2d440518c4435b434026d2c42d74d6ed8963a7677e0fb9156fd
5
5
  SHA512:
6
- metadata.gz: 3629c58577294a0c7945a3641161ea4c22edd7f996c74d412812e72ae9990881c1dd1e4344282c98c68f1c6150a41f475bd908e605315d12d2fa055a6e815f4a
7
- data.tar.gz: 9c5ff0253ccd9d6964acc28e4b4bdb6eff2e2920c7299043dd1ef2b9eb8713018d6d2646c279fb8f334304686f81f442bb0c3a4ed43e1392d93cd614ef7cf943
6
+ metadata.gz: fa7bcd81253a4b7052ca0b897f7b8217dd6c6fe6c6fa51fb93abd39f36dbc5f3de16ccfd9f7eacad7f067b0b0ff4ea55f70b77d0a9b0c3a71819c7a93d2f4d48
7
+ data.tar.gz: 820fb5b35797152e6d2d4981befab82e9eb916abaddd4c80e746639d1d810a620dc2072d116d1a7a6c4ec36c72d868a29428f2c05bab4969203e11dd38111d73
@@ -34,6 +34,8 @@ module Saml
34
34
  end
35
35
  class UnparseableMessage < SamlError
36
36
  end
37
+ class InvalidParams < SamlError
38
+ end
37
39
  class MetadataDownloadFailed < SamlError
38
40
  end
39
41
  class InvalidStore < SamlError
@@ -46,7 +46,8 @@ module Saml
46
46
  @authn_statement = Saml::Elements::AuthnStatement.new(authn_instant: authn_instant,
47
47
  address: options.delete(:address),
48
48
  authn_context_class_ref: options.delete(:authn_context_class_ref),
49
- session_index: options.delete(:session_index))
49
+ session_index: options.delete(:session_index),
50
+ session_not_on_or_after: options.delete(:session_not_on_or_after))
50
51
  super(*(args << options))
51
52
  @_id ||= Saml.generate_id
52
53
  @issue_instant ||= Time.now
@@ -20,7 +20,12 @@ module Saml
20
20
  end
21
21
 
22
22
  def receive_message(request, type)
23
- message = Saml::Encoding.decode_64(request.params["SAMLRequest"] || request.params["SAMLResponse"])
23
+ receive_xml = request.params["SAMLRequest"] || request.params["SAMLResponse"]
24
+ if receive_xml.nil?
25
+ raise Saml::Errors::InvalidParams, 'require params `SAMLRequest` or `SAMLResponse`'
26
+ end
27
+
28
+ message = Saml::Encoding.decode_64(receive_xml)
24
29
  notify('receive_message', message)
25
30
  request_or_response = Saml.parse_message(message, type)
26
31
 
@@ -8,6 +8,7 @@ module Saml
8
8
 
9
9
  attribute :authn_instant, Time, tag: "AuthnInstant", on_save: lambda { |val| val.utc.xmlschema }
10
10
  attribute :session_index, String, tag: "SessionIndex"
11
+ attribute :session_not_on_or_after, Time, tag: "SessionNotOnOrAfter", on_save: lambda { |val| val.utc.xmlschema if val.present?}
11
12
 
12
13
  has_one :subject_locality, Saml::Elements::SubjectLocality, tag: "SubjectLocality"
13
14
  has_one :authn_context, Saml::Elements::AuthnContext, tag: "AuthnContext"
@@ -1,3 +1,3 @@
1
1
  module Saml
2
- VERSION = '3.9.0'
2
+ VERSION = '3.9.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libsaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.0
4
+ version: 3.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoist Claassen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -240,7 +240,7 @@ homepage: https://www.digidentity.eu
240
240
  licenses:
241
241
  - MIT
242
242
  metadata: {}
243
- post_install_message:
243
+ post_install_message:
244
244
  rdoc_options: []
245
245
  require_paths:
246
246
  - lib
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  version: '0'
257
257
  requirements: []
258
258
  rubygems_version: 3.0.3
259
- signing_key:
259
+ signing_key:
260
260
  specification_version: 4
261
261
  summary: A gem to easily create SAML 2.0 messages.
262
262
  test_files: []