Class: RSAML::EncryptedAttribute
- Defined in:
- lib/rsaml/attribute.rb
Overview
An encrypted attribute.
Instance Attribute Summary
Attributes inherited from Encrypted
Instance Method Summary collapse
-
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the encrypted attribute.
-
#validate ⇒ Object
Validate the structure.
Methods inherited from Encrypted
Instance Method Details
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
Construct an XML fragment representing the encrypted attribute
69 70 71 72 73 74 |
# File 'lib/rsaml/attribute.rb', line 69 def to_xml(xml=Builder::XmlMarkup.new) xml.tag!('saml:EncryptedAttribute') { xml.tag!('xenc:EncryptedData', encrypted_data) encrypted_keys.each { |key| xml << key.to_xml } } end |
#validate ⇒ Object
Validate the structure
64 65 66 |
# File 'lib/rsaml/attribute.rb', line 64 def validate raise ValidationError, "Encrypted data is required" if encrypted_data.nil? end |