Sha256: 77d543aefca8b8f398b9df460475623084009e37dbfa53b70355138a2ae893ff

Contents?: true

Size: 521 Bytes

Versions: 3

Compression:

Stored size: 521 Bytes

Contents

#!/usr/bin/env ruby
require 'saml/kit'

Saml::Kit.deprecate("Use the 'saml-kit-cli' gem instead. saml-kit-decode-http-redirect*")

input = STDIN.read
binding = Saml::Kit::Bindings::HttpRedirect.new(location: '')

uri = begin
        URI.parse(input)
      rescue StandardError
        nil
      end
if uri
  query_params = Hash[uri.query.split('&').map { |x| x.split('=', 2) }]
  puts binding.deserialize(query_params).to_xml(pretty: true)
else
  puts binding.deserialize('SAMLRequest' => input).to_xml(pretty: true)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
saml-kit-1.0.9 exe/saml-kit-decode-http-redirect
saml-kit-1.0.8 exe/saml-kit-decode-http-redirect
saml-kit-1.0.7 exe/saml-kit-decode-http-redirect