mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 11:47:15 +08:00
FEATURE: verbose SSO logging
By enabling the site setting verbose_sso_logging you can log information every time a user tries initiates SSO and during SSO failures
This commit is contained in:
@ -10,12 +10,16 @@ class DiscourseSingleSignOn < SingleSignOn
|
||||
SiteSetting.sso_secret
|
||||
end
|
||||
|
||||
def self.generate_url(return_path="/")
|
||||
def self.generate_sso(return_path="/")
|
||||
sso = new
|
||||
sso.nonce = SecureRandom.hex
|
||||
sso.register_nonce(return_path)
|
||||
sso.return_sso_url = Discourse.base_url + "/session/sso_login"
|
||||
sso.to_url
|
||||
sso
|
||||
end
|
||||
|
||||
def self.generate_url(return_path="/")
|
||||
generate_sso(return_path).to_url
|
||||
end
|
||||
|
||||
def register_nonce(return_path)
|
||||
|
Reference in New Issue
Block a user