Class: SAML2::Entity::Group
Instance Attribute Summary
Attributes inherited from Base
#xml
Instance Method Summary
collapse
Methods included from Signable
#sign, #signature, #signed?, #signing_key, #valid_signature?, #validate_signature
Methods inherited from Base
#build, from_xml, #inspect, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
#initialize ⇒ Group
Returns a new instance of Group.
43
44
45
46
47
|
# File 'lib/saml2/entity.rb', line 43
def initialize
@entities = []
@id = "_#{SecureRandom.uuid}"
@valid_until = nil
end
|
Instance Method Details
#from_xml(node) ⇒ Object
49
50
51
52
53
54
55
56
|
# File 'lib/saml2/entity.rb', line 49
def from_xml(node)
super
@id = nil
remove_instance_variable(:@valid_until)
@entities = Base.load_object_array(xml, "md:EntityDescriptor|md:EntitiesDescriptor",
'EntityDescriptor' => Entity,
'EntitiesDescriptor' => Group)
end
|
#id ⇒ Object
62
63
64
|
# File 'lib/saml2/entity.rb', line 62
def id
@id ||= xml['ID']
end
|
#valid_schema? ⇒ Boolean
58
59
60
|
# File 'lib/saml2/entity.rb', line 58
def valid_schema?
Schemas.federation.valid?(xml.document)
end
|
#valid_until ⇒ Object
66
67
68
69
70
71
|
# File 'lib/saml2/entity.rb', line 66
def valid_until
unless instance_variable_defined?(:@valid_until)
@valid_until = xml['validUntil'] && Time.parse(xml['validUntil'])
end
@valid_until
end
|