Commit 7c9fcec
Changed files (3)
lib/saml/kit/identity_provider_metadata.rb
@@ -13,14 +13,6 @@ module Saml
super("IDPSSODescriptor", xml)
end
- def entity_id
- find_by("/md:EntityDescriptor/@entityID").value
- end
-
- def name_id_formats
- find_all("/md:EntityDescriptor/md:IDPSSODescriptor/md:NameIDFormat").map(&:text)
- end
-
def single_sign_on_services
xpath = "/md:EntityDescriptor/md:IDPSSODescriptor/md:SingleSignOnService"
find_all(xpath).map do |item|
lib/saml/kit/metadata.rb
@@ -15,6 +15,14 @@ module Saml
@xml = xml
end
+ def entity_id
+ find_by("/md:EntityDescriptor/@entityID").value
+ end
+
+ def name_id_formats
+ find_all("/md:EntityDescriptor/md:#{descriptor_name}/md:NameIDFormat").map(&:text)
+ end
+
def certificates
xpath = "/md:EntityDescriptor/md:#{descriptor_name}/md:KeyDescriptor"
find_all(xpath).map do |item|
lib/saml/kit/service_provider_metadata.rb
@@ -5,16 +5,6 @@ module Saml
super("SPSSODescriptor", xml)
end
- def entity_id
- find_by("/md:EntityDescriptor/@entityID").value
- end
-
- def name_id_formats
- find_all("/md:EntityDescriptor/md:SPSSODescriptor/md:NameIDFormat").map do |item|
- item.text
- end
- end
-
def assertion_consumer_services
find_all("/md:EntityDescriptor/md:SPSSODescriptor/md:AssertionConsumerService").map do |item|
{