mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
DEV: Add extension point to allow modifying SSO URL (#7937)
This allows plugins to, for example, add extra query params to the SSO URL when discourse redirects to to the SSO website.
This commit is contained in:
parent
c1d2fb115c
commit
997add3af9
@ -39,7 +39,7 @@ class SessionController < ApplicationController
|
|||||||
if SiteSetting.verbose_sso_logging
|
if SiteSetting.verbose_sso_logging
|
||||||
Rails.logger.warn("Verbose SSO log: Started SSO process\n\n#{sso.diagnostics}")
|
Rails.logger.warn("Verbose SSO log: Started SSO process\n\n#{sso.diagnostics}")
|
||||||
end
|
end
|
||||||
redirect_to sso.to_url
|
redirect_to sso_url(sso)
|
||||||
else
|
else
|
||||||
render body: nil, status: 404
|
render body: nil, status: 404
|
||||||
end
|
end
|
||||||
@ -525,4 +525,9 @@ class SessionController < ApplicationController
|
|||||||
@sso_error = text
|
@sso_error = text
|
||||||
render status: status, layout: 'no_ember'
|
render status: status, layout: 'no_ember'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# extension to allow plugins to customize the SSO URL
|
||||||
|
def sso_url(sso)
|
||||||
|
sso.to_url
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user