Class: Saml::Bindings::SOAP
- Inherits:
-
Object
- Object
- Saml::Bindings::SOAP
- Includes:
- Notification
- Defined in:
- lib/saml/bindings/soap.rb
Constant Summary collapse
- SOAP_ACTION =
'http://www.oasis-open.org/committees/security'
Class Method Summary collapse
- .create_response_xml(response) ⇒ Object
- .post_message(message, response_type) ⇒ Object
- .receive_message(request, type) ⇒ Object
Methods included from Notification
Class Method Details
.create_response_xml(response) ⇒ Object
10 11 12 |
# File 'lib/saml/bindings/soap.rb', line 10 def create_response_xml(response) notify('create_response', Saml::Util.sign_xml(response, :soap)) end |
.post_message(message, response_type) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/saml/bindings/soap.rb', line 14 def (, response_type) = notify('create_post', Saml::Util.sign_xml(, :soap)) http_response = Saml::Util.post(.destination, , { 'SOAPAction' => SOAP_ACTION } ) if http_response.code == "200" response = notify('receive_response', Saml.(http_response.body, response_type)) Saml::Util.verify_xml(response, http_response.body) else nil end end |
.receive_message(request, type) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/saml/bindings/soap.rb', line 27 def (request, type) raw_xml = request.body.dup.read notify('receive_message', raw_xml) = Saml.(raw_xml, type) skip_signature_verification = ( .is_a?(Saml::AuthnRequest) && !.provider.authn_requests_signed? ) if skip_signature_verification else Saml::Util.verify_xml(, raw_xml) end end |