Method: Saml::Util.decrypt_assertion
- Defined in:
- lib/saml/util.rb
.decrypt_assertion(encrypted_assertion, private_key) ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/saml/util.rb', line 72 def decrypt_assertion(encrypted_assertion, private_key) encrypted_assertion_xml = encrypted_assertion.is_a?(Saml::Elements::EncryptedAssertion) ? encrypted_assertion.to_xml : encrypted_assertion.to_s encrypted_document = Xmlenc::EncryptedDocument.new(encrypted_assertion_xml) Saml::Assertion.parse(encrypted_document.decrypt(private_key), single: true) end |