Sha256: c7f2e9122caf5c2cb83b9b3f721d6102eeee84871a4eddeece49401efb38fa6d

Contents?: true

Size: 738 Bytes

Versions: 15

Compression:

Stored size: 738 Bytes

Contents

module SamlRequestMacros

  def make_saml_request(requested_saml_acs_url = "https://foo.example.com/saml/consume")
    auth_request = Onelogin::Saml::Authrequest.new
    auth_url = auth_request.create(saml_settings(requested_saml_acs_url))
    CGI.unescape(auth_url.split("=").last)
  end

  def saml_settings(saml_acs_url = "https://foo.example.com/saml/consume")
    settings = Onelogin::Saml::Settings.new
    settings.assertion_consumer_service_url = saml_acs_url
    settings.issuer = "http://example.com/issuer"
    settings.idp_sso_target_url = "http://idp.com/saml/idp"
    settings.idp_cert_fingerprint = SamlIdp::Default::FINGERPRINT
    settings.name_identifier_format = SamlIdp::Default::NAME_ID_FORMAT
    settings
  end

end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
saml_idp-0.1.1 spec/support/saml_request_macros.rb
saml_idp-0.1.0 spec/support/saml_request_macros.rb
saml_idp-0.0.10 spec/support/saml_request_macros.rb
saml_idp-0.0.9 spec/support/saml_request_macros.rb
saml_idp-0.0.8 spec/support/saml_request_macros.rb
saml_idp-0.0.7 spec/support/saml_request_macros.rb
saml_idp-0.0.6 spec/support/saml_request_macros.rb
saml_idp-0.0.5 spec/support/saml_request_macros.rb
saml_idp-0.0.4 spec/support/saml_request_macros.rb
saml_idp-0.0.3 spec/support/saml_request_macros.rb
saml_idp-0.0.2 spec/support/saml_request_macros.rb
saml_idp-0.0.1 spec/support/saml_request_macros.rb
ruby-saml-idp-0.3.2 spec/support/saml_request_macros.rb
ruby-saml-idp-0.3.1 spec/support/saml_request_macros.rb
ruby-saml-idp-0.3.0 spec/support/saml_request_macros.rb