Skip to content

Commit

Permalink
fix: add saml signout URL
Browse files Browse the repository at this point in the history
  • Loading branch information
jakerenzella committed Jan 17, 2022
1 parent aabea8f commit 26e737b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/api/authentication_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ class AuthenticationApi < Grape::API
response[:auth_signout_url] =
if aaf_auth? && Doubtfire::Application.config.aaf[:auth_signout_url].present?
Doubtfire::Application.config.aaf[:auth_signout_url]
elsif saml_auth? && Doubtfire::Application.config.saml[:idp_sso_target_url].present?
Doubtfire::Application.config.saml[:idp_sso_target_url]
elsif saml_auth? && Doubtfire::Application.config.saml[:idp_sso_signout_url].present?
Doubtfire::Application.config.saml[:idp_sso_signout_url]
end
present response, with: Grape::Presenters::Presenter
end
Expand Down
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class Application < Rails::Application
config.saml[:entity_id] = ENV['DF_SAML_SP_ENTITY_ID']
# The IDP SAML login URL, (e.g., "https://login.microsoftonline.com/xxxx/saml2")
config.saml[:idp_sso_target_url] = ENV['DF_SAML_IDP_TARGET_URL']
# The IDP SAML logout URL, (e.g., "https://login.microsoftonline.com/xxxx/saml2")
config.saml[:idp_sso_signout_url] = ENV['DF_SAML_IDP_SIGNOUT_URL']

# The SAML response certificate and name format (if no XML URL metadata is provided)
if config.saml[:SAML_metadata_url].nil?
Expand All @@ -79,6 +81,7 @@ class Application < Rails::Application
" key => variable set?\n"\
" DF_SAML_CONSUMER_SERVICE_URL => #{!ENV['DF_SAML_CONSUMER_SERVICE_URL'].nil?}\n"\
" DF_SAML_SP_ENTITY_ID => #{!ENV['DF_SAML_SP_ENTITY_ID'].nil?}\n"\
" DF_SAML_IDP_SIGNOUT_URL => #{!ENV['DF_SAML_IDP_SIGNOUT_URL'].nil?}\n"\
" DF_SAML_IDP_TARGET_URL => #{!ENV['DF_SAML_IDP_TARGET_URL'].nil?}\n"
end

Expand Down

0 comments on commit 26e737b

Please sign in to comment.