lib/onelogin/ruby-saml/metadata.rb
def add_mdui_elements(sp_sso, settings)
        if settings.display_name || settings.description || settings.logo || settings.privacy_statement_url
          sp_ext = sp_sso.add_element "md:Extensions"
          sp_ui = sp_ext.add_element "mdui:UIInfo"

          if settings.display_name
            ui_name = sp_ui.add_element "mdui:DisplayName", {
              "xml:lang" => "en"
            }
            ui_name.text = settings.display_name
          end

          if settings.description
            ui_description = sp_ui.add_element "mdui:Description", {
              "xml:lang" => "en"
            }
            ui_description.text = settings.description
          end

          if settings.privacy_statement_url
            ui_privacy_statement_url = sp_ui.add_element "mdui:PrivacyStatementURL", {
              "xml:lang" => "en"
            }
            ui_privacy_statement_url.text = settings.privacy_statement_url
          end

          if settings.logo
            ui_logo = sp_ui.add_element "mdui:Logo", {
              "xml:lang" => "en"
            }
            ui_logo.text = settings.logo
          end
        end
      end
# 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 add_mdui_elements(sp_sso, settings)
        if settings.display_name || settings.description || settings.logo || settings.privacy_statement_url
          sp_ext = sp_sso.add_element "md:Extensions"
          sp_ui = sp_ext.add_element "mdui:UIInfo"
          if settings.display_name
            ui_name = sp_ui.add_element "mdui:DisplayName", {
              "xml:lang" => "en"
            }
            ui_name.text = settings.display_name
          end
          if settings.description
            ui_description = sp_ui.add_element "mdui:Description", {
              "xml:lang" => "en"
            }
            ui_description.text = settings.description
          end
          if settings.privacy_statement_url
            ui_privacy_statement_url = sp_ui.add_element "mdui:PrivacyStatementURL", {
              "xml:lang" => "en"
            }
            ui_privacy_statement_url.text = settings.privacy_statement_url
          end
          if settings.logo
            ui_logo = sp_ui.add_element "mdui:Logo", {
              "xml:lang" => "en"
            }
            ui_logo.text = settings.logo
          end
        end
      end
def add_mdui_elements ( sp_sso , settings ) if settings . display_name || settings . description || settings . logo || settings . privacy_statement_url sp_ext = sp_sso . add_element "md:Extensions" sp_ui = sp_ext . add_element "mdui:UIInfo" if settings . display_name ui_name = sp_ui . add_element "mdui:DisplayName" , { "xml:lang" => "en" } ui_name . text = settings . display_name end if settings . description ui_description = sp_ui . add_element "mdui:Description" , { "xml:lang" => "en" } ui_description . text = settings . description end if settings . privacy_statement_url ui_privacy_statement_url = sp_ui . add_element "mdui:PrivacyStatementURL" , { "xml:lang" => "en" } ui_privacy_statement_url . text = settings . privacy_statement_url end if settings . logo ui_logo = sp_ui . add_element "mdui:Logo" , { "xml:lang" => "en" } ui_logo . text = settings . logo end end 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
sp_sso
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