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