diff options
| author | mo khan <mo@mokhan.ca> | 2025-03-05 12:26:47 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-03-05 12:26:47 -0700 |
| commit | 06a4e0783c1886ca46468c4caeb42a41d56fd956 (patch) | |
| tree | 7d62749b994504c9a363b51fe2113b7b2aa13376 /bin/idp | |
| parent | 20e152182f7137ae2c7f512d0cab1b3c846a4677 (diff) | |
refactor: move SAML routes to /saml/ path
Diffstat (limited to 'bin/idp')
| -rwxr-xr-x | bin/idp | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -13,9 +13,9 @@ gemfile do gem "webrick", "~> 1.0" end -$scheme = ENV.fetch('SCHEME', 'http') -$port = ENV.fetch('PORT', 8282).to_i -$host = ENV.fetch('HOST', "localhost:#{$port}") +$scheme = ENV.fetch("SCHEME", "http") +$port = ENV.fetch("PORT", 8282).to_i +$host = ENV.fetch("HOST", "localhost:#{$port}") class JWT attr_reader :claims @@ -66,7 +66,7 @@ class OnDemandRegistry < Saml::Kit::DefaultRegistry end Saml::Kit.configure do |x| - x.entity_id = "#{$scheme}://#{$host}/metadata.xml" + x.entity_id = "#{$scheme}://#{$host}/saml/metadata.xml" x.registry = OnDemandRegistry.new x.logger = Logger.new("/dev/stderr") end @@ -83,7 +83,7 @@ class IdentityProvider return oauth_metadata when '/.well-known/webfinger' # RFC-7033 return not_found - when "/metadata.xml" + when "/saml/metadata.xml" return saml_metadata when "/saml/new" # TODO:: render a login page @@ -117,9 +117,6 @@ class IdentityProvider private - # Download IDP Metadata - # - # GET /metadata.xml def saml_metadata xml = Saml::Kit::Metadata.build_xml do |builder| builder.contact_email = 'hi@example.com' |
