saml-kit 1.0.3 → 1.0.4

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: fa485135c5f5f05fd68485afd0c7b7d6632f2614ec563bdc01da7dd4f28f17f9
4
- data.tar.gz: 25cb0b089d88668ba9164375f0f7b79912cfdd8fea2f62a6ecb0a8c125758fa3
3
+ metadata.gz: a7e1e99c8973fbde439b32b773786eab01bdd0fa9ed35dd80bf670f82ac49017
4
+ data.tar.gz: 952944cc544a83832b607a4eb61160a1f62cad07c8547130dfdd2dee00a99d21
5
5
  SHA512:
6
- metadata.gz: c3cceecfd6d9b921903a6ea7e3a010742fe9d2447aa2ca384d31af280ec372650025272d58f111ff7c0025578540e4af49ac685f0d079cc7d6d37e72093cdc6b
7
- data.tar.gz: a6a4dfe4d470bd57fd901aaced1a465682bbbb0b53002c21d4d10bac89f6821cc2b31c09abceeaf227b344baff7c33c12bfd4b0d0a75c362919c988fcd1cc94b
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)
@@ -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-redirect*")
5
+
4
6
  input = STDIN.read
5
7
  binding = Saml::Kit::Bindings::HttpRedirect.new(location: '')
6
8
 
@@ -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
@@ -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"
@@ -1,5 +1,5 @@
1
1
  module Saml
2
2
  module Kit
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
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.3
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-08 00:00:00.000000000 Z
11
+ date: 2018-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel