Method: Saml::Util.decrypt_assertion
- Defined in:
- lib/saml/util.rb
.decrypt_assertion(encrypted_assertion, private_key) ⇒ Object
89 90 91 92 93 94 95 |
# File 'lib/saml/util.rb', line 89 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 |