saml-kit 1.0.4 → 1.0.5

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: a7e1e99c8973fbde439b32b773786eab01bdd0fa9ed35dd80bf670f82ac49017
4
- data.tar.gz: 952944cc544a83832b607a4eb61160a1f62cad07c8547130dfdd2dee00a99d21
3
+ metadata.gz: b2492d44c647c9dad4c879ad4c4ee0386a1ac47064ee1bd32361fd78a0dae463
4
+ data.tar.gz: 04d41916481b1b6c85ac10805bdf30f40fd516fa684575302f0bc5e0c8b282c9
5
5
  SHA512:
6
- metadata.gz: 71edf453a7ad88a96d211e47a14935cdbb246edbd3b82b5ecf4757a1b5894a379222051f3b9bb78f310dc3485fb9243571535b3f96a61c4da3babf59e6530886
7
- data.tar.gz: 80278ceca2cd260b9f6f60ba441bc493b72778c3a436b3cc671601bd33d2b254facb5a80a9665d8d73b8347e36f75b3e4f8a2958836f71de66e11e676d3d9bc3
6
+ metadata.gz: 5d0cfb62a014c2d7daa43f0f1018d440063c4ef6c4bfe011c11fccf59d7872a0939baa9451095b4237682c8c472d0bd54748a96d82faab0d7e8ef5a47b3cff1e
7
+ data.tar.gz: 2538d1eac3597a1c53b0d4b777cf93770e19b25fbaf8a6590ad0e926aec0d6f8e038cfa21b3247e53818f0c3c7d4f07f2c7d73f8c24060c35ca955a138110315
@@ -36,7 +36,8 @@ module Saml
36
36
  end
37
37
 
38
38
  def active?(now = Time.current)
39
- now > configuration.clock_drift.seconds.before(started_at) && !expired?
39
+ drifted_started_at = started_at - configuration.clock_drift.to_i.seconds
40
+ now > drifted_started_at && !expired?
40
41
  end
41
42
 
42
43
  def attributes
@@ -90,6 +90,7 @@ module Saml
90
90
  http.read_timeout = 30
91
91
  http.use_ssl = uri.is_a?(URI::HTTPS)
92
92
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE unless verify_ssl
93
+ http.set_debug_output(Saml::Kit.logger)
93
94
  http
94
95
  end
95
96
  end
@@ -1,25 +1,32 @@
1
1
  module Saml
2
2
  module Kit
3
3
  module Namespaces
4
- ASSERTION = "urn:oasis:names:tc:SAML:2.0:assertion"
5
- ATTR_SPLAT = "urn:oasis:names:tc:SAML:2.0:attrname-format:*"
6
- BASIC = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic"
7
- BEARER = "urn:oasis:names:tc:SAML:2.0:cm:bearer"
8
- EMAIL_ADDRESS = "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
9
- INVALID_NAME_ID_POLICY = "urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy"
10
- METADATA = "urn:oasis:names:tc:SAML:2.0:metadata"
11
- PASSWORD = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password"
12
- PASSWORD_PROTECTED = "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
13
- PERSISTENT = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
14
- PROTOCOL = "urn:oasis:names:tc:SAML:2.0:protocol"
15
- REQUESTER_ERROR = "urn:oasis:names:tc:SAML:2.0:status:Requester"
16
- RESPONDER_ERROR = "urn:oasis:names:tc:SAML:2.0:status:Responder"
17
- SUCCESS = "urn:oasis:names:tc:SAML:2.0:status:Success"
18
- TRANSIENT = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
19
- UNSPECIFIED = "urn:oasis:names:tc:SAML:2.0:consent:unspecified"
20
- UNSPECIFIED_NAMEID = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
21
- URI = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
22
- VERSION_MISMATCH_ERROR = "urn:oasis:names:tc:SAML:2.0:status:VersionMismatch"
4
+ SAML_2_0 = "urn:oasis:names:tc:SAML:2.0"
5
+ SAML_1_1 = "urn:oasis:names:tc:SAML:1.1"
6
+ ATTR_NAME_FORMAT = "#{SAML_2_0}:attrname-format"
7
+ NAME_ID_FORMAT_1_1 = "#{SAML_1_1}:nameid-format"
8
+ NAME_ID_FORMAT_2_0 = "#{SAML_2_0}:nameid-format"
9
+ STATUS = "#{SAML_2_0}:status"
10
+
11
+ ASSERTION = "#{SAML_2_0}:assertion"
12
+ ATTR_SPLAT = "#{ATTR_NAME_FORMAT}:*"
13
+ BASIC = "#{ATTR_NAME_FORMAT}:basic"
14
+ BEARER = "#{SAML_2_0}:cm:bearer"
15
+ EMAIL_ADDRESS = "#{NAME_ID_FORMAT_1_1}:emailAddress"
16
+ INVALID_NAME_ID_POLICY = "#{STATUS}:InvalidNameIDPolicy"
17
+ METADATA = "#{SAML_2_0}:metadata"
18
+ PASSWORD = "#{SAML_2_0}:ac:classes:Password"
19
+ PASSWORD_PROTECTED = "#{SAML_2_0}:ac:classes:PasswordProtectedTransport"
20
+ PERSISTENT = "#{NAME_ID_FORMAT_2_0}:persistent"
21
+ PROTOCOL = "#{SAML_2_0}:protocol"
22
+ REQUESTER_ERROR = "#{STATUS}:Requester"
23
+ RESPONDER_ERROR = "#{STATUS}:Responder"
24
+ SUCCESS = "#{STATUS}:Success"
25
+ TRANSIENT = "#{NAME_ID_FORMAT_2_0}:transient"
26
+ UNSPECIFIED = "#{SAML_2_0}:consent:unspecified"
27
+ UNSPECIFIED_NAMEID = "#{NAME_ID_FORMAT_1_1}:unspecified"
28
+ URI = "#{ATTR_NAME_FORMAT}:uri"
29
+ VERSION_MISMATCH_ERROR = "#{STATUS}:VersionMismatch"
23
30
  end
24
31
  end
25
32
  end
@@ -1,6 +1,8 @@
1
1
  module Saml
2
2
  module Kit
3
3
  class Signature
4
+ include ActiveModel::Validations
5
+
4
6
  def initialize(xml_hash)
5
7
  @xml_hash = xml_hash
6
8
  end
@@ -1,5 +1,5 @@
1
1
  module Saml
2
2
  module Kit
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-09 00:00:00.000000000 Z
11
+ date: 2018-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  version: '0'
247
247
  requirements: []
248
248
  rubyforge_project:
249
- rubygems_version: 2.7.3
249
+ rubygems_version: 2.7.5
250
250
  signing_key:
251
251
  specification_version: 4
252
252
  summary: A simple toolkit for working with SAML.