saml-kit 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7e1e99c8973fbde439b32b773786eab01bdd0fa9ed35dd80bf670f82ac49017
|
4
|
+
data.tar.gz: 952944cc544a83832b607a4eb61160a1f62cad07c8547130dfdd2dee00a99d21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71edf453a7ad88a96d211e47a14935cdbb246edbd3b82b5ecf4757a1b5894a379222051f3b9bb78f310dc3485fb9243571535b3f96a61c4da3babf59e6530886
|
7
|
+
data.tar.gz: 80278ceca2cd260b9f6f60ba441bc493b72778c3a436b3cc671601bd33d2b254facb5a80a9665d8d73b8347e36f75b3e4f8a2958836f71de66e11e676d3d9bc3
|
@@ -1,6 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'saml/kit'
|
3
3
|
|
4
|
+
Saml::Kit.deprecate("Use the 'saml-kit-cli' gem instead. saml-kit-create-self-signed-certificate")
|
5
|
+
|
4
6
|
puts "Enter Passphrase:"
|
5
7
|
passphrase = STDIN.read.strip
|
6
8
|
certificate, private_key = ::Xml::Kit::SelfSignedCertificate.new.create(passphrase: passphrase)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'saml/kit'
|
3
3
|
|
4
|
+
Saml::Kit.deprecate("Use the 'saml-kit-cli' gem instead. saml-kit-decode-http-post")
|
5
|
+
|
4
6
|
saml = STDIN.read
|
5
7
|
binding = Saml::Kit::Bindings::HttpPost.new(location: '')
|
6
8
|
puts binding.deserialize('SAMLRequest' => saml).to_xml(pretty: true)
|
data/lib/saml/kit/assertion.rb
CHANGED
@@ -8,7 +8,7 @@ module Saml
|
|
8
8
|
validate :must_be_active_session
|
9
9
|
attr_reader :name
|
10
10
|
|
11
|
-
def initialize(xml_hash, configuration:)
|
11
|
+
def initialize(xml_hash, configuration: Saml::Kit.configuration)
|
12
12
|
@name = "Assertion"
|
13
13
|
@xml_hash = xml_hash
|
14
14
|
@configuration = configuration
|
@@ -36,7 +36,7 @@ module Saml
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def active?(now = Time.current)
|
39
|
-
now > configuration.clock_drift.before(started_at) && !expired?
|
39
|
+
now > configuration.clock_drift.seconds.before(started_at) && !expired?
|
40
40
|
end
|
41
41
|
|
42
42
|
def attributes
|
@@ -71,6 +71,10 @@ module Saml
|
|
71
71
|
@xml_hash.fetch('Response', {}).fetch('EncryptedAssertion', nil).present?
|
72
72
|
end
|
73
73
|
|
74
|
+
def present?
|
75
|
+
assertion.present?
|
76
|
+
end
|
77
|
+
|
74
78
|
private
|
75
79
|
|
76
80
|
attr_reader :configuration
|
data/lib/saml/kit/namespaces.rb
CHANGED
@@ -6,6 +6,7 @@ module Saml
|
|
6
6
|
BASIC = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic"
|
7
7
|
BEARER = "urn:oasis:names:tc:SAML:2.0:cm:bearer"
|
8
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"
|
9
10
|
METADATA = "urn:oasis:names:tc:SAML:2.0:metadata"
|
10
11
|
PASSWORD = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password"
|
11
12
|
PASSWORD_PROTECTED = "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
|
data/lib/saml/kit/version.rb
CHANGED
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
|
+
version: 1.0.4
|
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-
|
11
|
+
date: 2018-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|