Sha256: cddbe280b51c43d6e3e398690064b725ac7253b681a661a39f5cc7904bd3ec30
Contents?: true
Size: 552 Bytes
Versions: 6
Compression:
Stored size: 552 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true 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
6 entries across 6 versions & 1 rubygems