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
|
||||
Rails.logger.warn("Verbose SSO log: Started SSO process\n\n#{sso.diagnostics}")
|
||||
end
|
||||
redirect_to sso.to_url
|
||||
redirect_to sso_url(sso)
|
||||
else
|
||||
render body: nil, status: 404
|
||||
end
|
||||
|
@ -525,4 +525,9 @@ class SessionController < ApplicationController
|
|||
@sso_error = text
|
||||
render status: status, layout: 'no_ember'
|
||||
end
|
||||
|
||||
# extension to allow plugins to customize the SSO URL
|
||||
def sso_url(sso)
|
||||
sso.to_url
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue