saml-kit 1.0.1 → 1.0.2

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: 89fe7534c8401b0969b84b1203ad4407f74d683edd3a23fc936a0f49a8c17c47
4
- data.tar.gz: f2aed438ae40ed05457d596744f6517b507ac2bc5867e7b2d61c3fc3c80c37b2
3
+ metadata.gz: 8a6f4a6a0647cd31ca56459bcc2c1925a1cc4842d86626b44ac72cbe9df0d91d
4
+ data.tar.gz: 9b82a518435e992fe4e034eea0da43ffcde66f6e1cad26f3d87d39b0b4d17dac
5
5
  SHA512:
6
- metadata.gz: 255b1e91566bb38cf4985b271c0e49b8d58eca1c68c65bd5a8ca8974632a3bc7f87f872aaac1fd1ffb3242451bae0724e3252e100b768b36800b45a7b900cde4
7
- data.tar.gz: 8c359c3052d734a1cba95f830a5c42d6f9f2d0c1dcdfe79d9a65c1f4c47b323308d349c63990d77e9211cc184da0c65b689339d449f48570be12be159f39ea54
6
+ metadata.gz: 0d1c8f0652f11111137a40b9a95a7430879fbc19b14993919d7309a4f1c2f50cd2041bf40928e9513b950508c41cc58acd666bcb2be8b2bfc474844e2cb4e5d2
7
+ data.tar.gz: ea30a028893904452ef216f56001a9a84681f09a31fa62d324651aa59112f7179974740070d21918f58b764c0709af4943501c9d0e2e1965d3e6e327e03834f3
@@ -1,6 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'saml/kit'
3
3
 
4
- saml = STDIN.read
5
- binding = Saml::Kit::Bindings::HttpRedirectBinding.new(location: '')
6
- puts binding.deserialize('SAMLRequest' => saml).to_xml(pretty: true)
4
+ input = STDIN.read
5
+ binding = Saml::Kit::Bindings::HttpRedirect.new(location: '')
6
+
7
+ uri = URI.parse(input) rescue nil
8
+ if uri
9
+ query_params = Hash[uri.query.split('&').map { |x| x.split('=', 2) }]
10
+ puts binding.deserialize(query_params).to_xml(pretty: true)
11
+ else
12
+ puts binding.deserialize('SAMLRequest' => input).to_xml(pretty: true)
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Saml
2
2
  module Kit
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
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.1
4
+ version: 1.0.2
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-01-27 00:00:00.000000000 Z
11
+ date: 2018-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel