class SAML2::Role
@abstract
Attributes
Non-serialized field representing fingerprints of certificates that you don’t actually have the full certificate for.
Non-serialized field representing private keys for performing decryption/signing operations @return [Array<OpenSSL::PKey>]
Public Class Methods
Source
# File lib/saml2/role.rb, line 29 def initialize super @supported_protocols = Set.new @supported_protocols << Protocols::SAML2 @keys = [] @private_keys = [] @fingerprints = [] end
Calls superclass method
SAML2::OrganizationAndContacts::new
Public Instance Methods
Source
# File lib/saml2/role.rb, line 62 def encryption_keys keys.select(&:encryption?) end
@return [Array<KeyDescriptor>]
Source
# File lib/saml2/role.rb, line 39 def from_xml(node) super @supported_protocols = nil @keys = nil end
(see Base#from_xml
)
Calls superclass method
SAML2::OrganizationAndContacts#from_xml
Source
# File lib/saml2/role.rb, line 52 def keys @keys ||= load_object_array(xml, "md:KeyDescriptor", KeyDescriptor) end
@return [Array<KeyDescriptor>]
Source
# File lib/saml2/role.rb, line 57 def signing_keys keys.select(&:signing?) end
@return [Array<KeyDescriptor>]
Source
# File lib/saml2/role.rb, line 47 def supported_protocols @supported_protocols ||= xml["protocolSupportEnumeration"].split end
@see Protocols
@return [Array<String>]
Protected Instance Methods
Source
# File lib/saml2/role.rb, line 69 def build(builder) builder.parent["protocolSupportEnumeration"] = supported_protocols.to_a.join(" ") keys.each do |key| key.build(builder) end super end
should be called from inside the role element
Calls superclass method
SAML2::OrganizationAndContacts#build