Class: SAML2::Role
Direct Known Subclasses
SSO
Defined Under Namespace
Modules: Protocols
Instance Attribute Summary collapse
#contacts, #organization
Attributes inherited from Base
#xml
Instance Method Summary
collapse
Methods inherited from Base
from_xml, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
#initialize ⇒ Role
Returns a new instance of Role.
17
18
19
20
21
22
|
# File 'lib/saml2/role.rb', line 17
def initialize
super
@supported_protocols = Set.new
@supported_protocols << Protocols::SAML2
@keys = []
end
|
Instance Attribute Details
#keys ⇒ Object
34
35
36
|
# File 'lib/saml2/role.rb', line 34
def keys
@keys ||= load_object_array(xml, 'md:KeyDescriptor', Key)
end
|
#supported_protocols ⇒ Object
30
31
32
|
# File 'lib/saml2/role.rb', line 30
def supported_protocols
@supported_protocols ||= xml['protocolSupportEnumeration'].split
end
|
Instance Method Details
#encryption_keys ⇒ Object
42
43
44
|
# File 'lib/saml2/role.rb', line 42
def encryption_keys
keys.select { |key| key.encryption? }
end
|
#from_xml(node) ⇒ Object
24
25
26
27
28
|
# File 'lib/saml2/role.rb', line 24
def from_xml(node)
super
@supported_protocols = nil
@keys = nil
end
|
#signing_keys ⇒ Object
38
39
40
|
# File 'lib/saml2/role.rb', line 38
def signing_keys
keys.select { |key| key.signing? }
end
|