lib/onelogin/ruby-saml/metadata.rb
# Return SP metadata based on the settings.
# @param settings [OneLogin::RubySaml::Settings|nil] Toolkit settings
# @param pretty_print [Boolean] Pretty print or not the response
#                               (No pretty print if you gonna validate the signature)
# @param valid_until [DateTime] Metadata's valid time
# @param cache_duration [Integer] Duration of the cache in seconds
# @return [String] XML Metadata of the Service Provider
#
Return SP metadata based on the settings.
Return SP metadata based on the settings .
def generate(settings, pretty_print=false, valid_until=nil, cache_duration=nil)
        meta_doc = XMLSecurity::Document.new
        add_xml_declaration(meta_doc)
        root = add_root_element(meta_doc, settings, valid_until, cache_duration)
        sp_sso = add_sp_sso_element(root, settings)
        add_mdui_elements(sp_sso, settings)
        add_sp_certificates(sp_sso, settings)
        add_sp_service_elements(sp_sso, root, settings)
        add_extras(root, settings)
        embed_signature(meta_doc, settings)
        output_xml(meta_doc, pretty_print)
      end
def generate ( settings , pretty_print = false , valid_until = nil , cache_duration = nil ) meta_doc = XMLSecurity :: Document . new add_xml_declaration ( meta_doc ) root = add_root_element ( meta_doc , settings , valid_until , cache_duration ) sp_sso = add_sp_sso_element ( root , settings ) add_mdui_elements ( sp_sso , settings ) add_sp_certificates ( sp_sso , settings ) add_sp_service_elements ( sp_sso , root , settings ) add_extras ( root , settings ) embed_signature ( meta_doc , settings ) output_xml ( meta_doc , pretty_print ) end
Return SP metadata based on the settings.
Return SP metadata based on the settings .
XML Metadata of the Service Provider
XML Metadata of the Service Provider
String
settings
None
pretty_print
Pretty print or not the response (No pretty print if you gonna validate the signature)
Pretty print or not the response ( No pretty print if you gonna validate the signature )
valid_until
Metadata's valid time
Metadata ' s valid time
cache_duration
Duration of the cache in seconds
Duration of the cache in seconds