Commit 564f4ec
Changed files (1)
lib
saml
kit
lib/saml/kit/cli.rb
@@ -22,6 +22,20 @@ module Saml
say ""
say document.to_xml(pretty: true), :green
end
+
+ desc "post saml", "Decodes the SAMLRequest/SAMLResponse using the HTTP Post binding"
+ def post(saml_request)
+ binding = Saml::Kit::Bindings::HttpPost.new(location: '')
+ document = binding.deserialize('SAMLRequest' => saml_request)
+ 2.times { say "" }
+ say_status :success, "Decoded #{document.class}"
+ print_table [
+ ["ID", "Issuer", "Version", "Issue instant"],
+ [document.id, document.issuer, document.version, document.issue_instant.iso8601 ]
+ ]
+ say ""
+ say document.to_xml(pretty: true)
+ end
end
class Generate < Thor