Commit d32d787
Changed files (1)
lib
saml
kit
lib/saml/kit/templatable.rb
@@ -21,7 +21,7 @@ module Saml
end
def encryption_for(xml:)
- if encrypt && encryption_certificate
+ if encrypt?
temp = ::Builder::XmlMarkup.new
yield temp
xml_encryption = Saml::Kit::Builders::XmlEncryption.new(temp.target!, encryption_certificate.public_key)
@@ -31,6 +31,10 @@ module Saml
end
end
+ def encrypt?
+ encrypt && encryption_certificate
+ end
+
def render(model, options)
Saml::Kit::Template.new(model).to_xml(options)
end