Commit 89a7cc0
2017-10-23 01:46:15
1 parent
fa4a778
Changed files (2)
airport
app
controllers
saml-kit
lib
saml
kit
airport/app/controllers/sessions_controller.rb
@@ -18,14 +18,10 @@ class SessionsController < ApplicationController
def query_params
{
- 'SAMLRequest' => Saml::Kit::Request.encode(authentication_request),
+ 'SAMLRequest' => Saml::Kit::Request.authentication,
'RelayState' => JSON.generate(inbound_path: '/'),
}.map do |(x, y)|
"#{x}=#{CGI.escape(y)}"
end.join('&')
end
-
- def authentication_request
- Saml::Kit::AuthenticationRequest::Builder.new
- end
end
saml-kit/lib/saml/kit/request.rb
@@ -5,6 +5,10 @@ module Saml
Base64.encode64(compress(document.to_xml))
end
+ def self.authentication
+ encode(AuthenticationRequest::Builder.new)
+ end
+
def self.compress(content)
content
#Zlib::Deflate.deflate(xml, 9)[2..-5]