Class: SAML2::Role Abstract
- Includes:
- OrganizationAndContacts, Signable
- Defined in:
- lib/saml2/role.rb
Overview
Direct Known Subclasses
Defined Under Namespace
Modules: Protocols
Instance Attribute Summary collapse
-
#fingerprints ⇒ Object
Non-serialized field representing fingerprints of certificates that you don’t actually have the full certificate for.
- #keys ⇒ Array<KeyDescriptor>
-
#private_keys ⇒ Array<OpenSSL::PKey>
Non-serialized field representing private keys for performing decryption/signing operations.
- #supported_protocols ⇒ Array<String>
Attributes included from OrganizationAndContacts
Attributes inherited from Base
Instance Method Summary collapse
- #encryption_keys ⇒ Array<KeyDescriptor>
-
#from_xml(node) ⇒ void
Parse an XML element into this object.
-
#initialize ⇒ Role
constructor
A new instance of Role.
- #signing_keys ⇒ Array<KeyDescriptor>
Methods included from Signable
#sign, #signature, #signed?, #signing_key, #valid_signature?, #validate_signature
Methods inherited from Base
#decrypt, from_xml, #inspect, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
Instance Attribute Details
#fingerprints ⇒ Object
Non-serialized field representing fingerprints of certificates that you don’t actually have the full certificate for.
29 30 31 |
# File 'lib/saml2/role.rb', line 29 def fingerprints @fingerprints end |
#keys ⇒ Array<KeyDescriptor>
54 55 56 |
# File 'lib/saml2/role.rb', line 54 def keys @keys ||= load_object_array(xml, "md:KeyDescriptor", KeyDescriptor) end |
#private_keys ⇒ Array<OpenSSL::PKey>
Non-serialized field representing private keys for performing decryption/signing operations
25 26 27 |
# File 'lib/saml2/role.rb', line 25 def private_keys @private_keys end |
#supported_protocols ⇒ Array<String>
49 50 51 |
# File 'lib/saml2/role.rb', line 49 def supported_protocols @supported_protocols ||= xml["protocolSupportEnumeration"].split end |
Instance Method Details
#encryption_keys ⇒ Array<KeyDescriptor>
64 65 66 |
# File 'lib/saml2/role.rb', line 64 def encryption_keys keys.select(&:encryption?) end |
#from_xml(node) ⇒ void
This method returns an undefined value.
Parse an XML element into this object.
41 42 43 44 45 |
# File 'lib/saml2/role.rb', line 41 def from_xml(node) super @supported_protocols = nil @keys = nil end |
#signing_keys ⇒ Array<KeyDescriptor>
59 60 61 |
# File 'lib/saml2/role.rb', line 59 def signing_keys keys.select(&:signing?) end |