Sha256: 45048681f698502baf07c6d039dfedb052345f58d983f7d6cf06cffa0363c1b0

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

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

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

uri = URI.parse(input) rescue nil
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

2 entries across 2 versions & 1 rubygems

Version Path
saml-kit-1.0.3 exe/saml-kit-decode-http-redirect
saml-kit-1.0.2 exe/saml-kit-decode-http-redirect