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
#initialize ⇒ Role
Returns a new instance of Role.
29 30 31 32 33 34 35 36 |
# File 'lib/saml2/role.rb', line 29 def initialize super @supported_protocols = Set.new @supported_protocols << Protocols::SAML2 @keys = [] @private_keys = [] @fingerprints = [] end |
Instance Attribute Details
#fingerprints ⇒ Object
Non-serialized field representing fingerprints of certificates that you don’t actually have the full certificate for.
27 28 29 |
# File 'lib/saml2/role.rb', line 27 def fingerprints @fingerprints end |
#keys ⇒ Array<KeyDescriptor>
52 53 54 |
# File 'lib/saml2/role.rb', line 52 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
23 24 25 |
# File 'lib/saml2/role.rb', line 23 def private_keys @private_keys end |
#supported_protocols ⇒ Array<String>
47 48 49 |
# File 'lib/saml2/role.rb', line 47 def supported_protocols @supported_protocols ||= xml["protocolSupportEnumeration"].split end |
Instance Method Details
#encryption_keys ⇒ Array<KeyDescriptor>
62 63 64 |
# File 'lib/saml2/role.rb', line 62 def encryption_keys keys.select(&:encryption?) end |
#from_xml(node) ⇒ void
This method returns an undefined value.
Parse an XML element into this object.
39 40 41 42 43 |
# File 'lib/saml2/role.rb', line 39 def from_xml(node) super @supported_protocols = nil @keys = nil end |
#signing_keys ⇒ Array<KeyDescriptor>
57 58 59 |
# File 'lib/saml2/role.rb', line 57 def signing_keys keys.select(&:signing?) end |