From a2df2654765c85cb7e7efc5eec9a97befa47bf15 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 9 May 2021 17:04:53 +0100 Subject: Add trace logging to SSO methods (#15803) It is currenly impossible to detect which "SSO" method is responsible for login. This PR adds some basic trace logging to these methods. Signed-off-by: Andrew Thornton --- modules/auth/sso/oauth2.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/auth/sso/oauth2.go') diff --git a/modules/auth/sso/oauth2.go b/modules/auth/sso/oauth2.go index fcd6845b38..b052b5599a 100644 --- a/modules/auth/sso/oauth2.go +++ b/modules/auth/sso/oauth2.go @@ -130,6 +130,7 @@ func (o *OAuth2) VerifyAuthData(req *http.Request, w http.ResponseWriter, store if id <= 0 { return nil } + log.Trace("OAuth2 Authorization: Found token for user[%d]", id) user, err := models.GetUserByID(id) if err != nil { @@ -139,5 +140,6 @@ func (o *OAuth2) VerifyAuthData(req *http.Request, w http.ResponseWriter, store return nil } + log.Trace("OAuth2 Authorization: Logged in user %-v", user) return user } -- cgit v1.2.3