Class: Saml::Elements::EncryptedID

Inherits:
Object
  • Object
show all
Includes:
Base, XMLHelpers, XmlMapper
Defined in:
lib/saml/elements/encrypted_id.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XMLHelpers

#add_signature, #to_soap, #to_xml

Constructor Details

#initialize(*args) ⇒ EncryptedID

Returns a new instance of EncryptedID.



21
22
23
24
# File 'lib/saml/elements/encrypted_id.rb', line 21

def initialize(*args)
  options = args.extract_options!
  super(*(args << options))
end

Instance Attribute Details

#xml_nodeObject

Returns the value of attribute xml_node.



10
11
12
# File 'lib/saml/elements/encrypted_id.rb', line 10

def xml_node
  @xml_node
end

Instance Method Details

#encrypt(key_descriptors, key_options = {}) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/saml/elements/encrypted_id.rb', line 26

def encrypt(key_descriptors, key_options = {})
  key_descriptors = Array(key_descriptors)

  if key_descriptors.any?
    if key_descriptors.one?
      encrypt_for_one_key_descriptor(key_descriptors.first, key_options)
    else
      encrypt_for_multiple_key_descriptors(key_descriptors, key_options)
    end
  end
end