1
0
Fork 0
forked from forgejo/forgejo

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 <art27@cantab.net>
This commit is contained in:
zeripath 2021-05-09 17:04:53 +01:00 committed by GitHub
parent 4ea0b46d9b
commit a2df265476
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 0 deletions

View file

@ -77,6 +77,8 @@ func SessionUser(sess SessionStore) *models.User {
if uid == nil {
return nil
}
log.Trace("Session Authorization: Found user[%d]", uid)
id, ok := uid.(int64)
if !ok {
return nil
@ -90,6 +92,8 @@ func SessionUser(sess SessionStore) *models.User {
}
return nil
}
log.Trace("Session Authorization: Logged in user %-v", user)
return user
}