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