saml-kit 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/kit/assertion.rb +5 -3
- data/lib/saml/kit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27101b53cc92074aa1b0ea8f84d40d41f1bf32b6b208a1a5d9b94d92087cfa51
|
4
|
+
data.tar.gz: c0ad9546f68fa6feb9afaf34e8609cfac835ab7607790542a9a7146fe94ed846
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 656acd1866446463a4bf2578eb0b543657713ec83e8cf9c9cde89c6298c54075f857bf008c7812e42539bb715e4c5158fce899fff390c558dedc0dd692d09aac
|
7
|
+
data.tar.gz: bb7a65a294eb4a47edc1c29e16908f12c57fe74a0423b26baefc713e9fc223f47ef6533f35b66cb2ffc4bb64921352afd849296dbfed98e202ab4d53ae03f67e
|
data/lib/saml/kit/assertion.rb
CHANGED
@@ -7,11 +7,13 @@ module Saml
|
|
7
7
|
validate :must_match_issuer
|
8
8
|
validate :must_be_active_session
|
9
9
|
attr_reader :name
|
10
|
+
attr_accessor :occurred_at
|
10
11
|
|
11
12
|
def initialize(xml_hash, configuration: Saml::Kit.configuration)
|
12
13
|
@name = "Assertion"
|
13
14
|
@xml_hash = xml_hash
|
14
15
|
@configuration = configuration
|
16
|
+
@occurred_at = Time.current
|
15
17
|
end
|
16
18
|
|
17
19
|
def issuer
|
@@ -31,13 +33,13 @@ module Saml
|
|
31
33
|
xml_hash ? Signature.new(xml_hash) : nil
|
32
34
|
end
|
33
35
|
|
34
|
-
def expired?(now =
|
36
|
+
def expired?(now = occurred_at)
|
35
37
|
now > expired_at
|
36
38
|
end
|
37
39
|
|
38
|
-
def active?(now =
|
40
|
+
def active?(now = occurred_at)
|
39
41
|
drifted_started_at = started_at - configuration.clock_drift.to_i.seconds
|
40
|
-
now > drifted_started_at && !expired?
|
42
|
+
now > drifted_started_at && !expired?(now)
|
41
43
|
end
|
42
44
|
|
43
45
|
def attributes
|
data/lib/saml/kit/version.rb
CHANGED