Commit bafaf8a7 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Add detailed error logging for SSO authentication failures

- Log specific SSO authentication error code and message
- Improve error traceability and debugging for authentication middleware
parent eba4454a
......@@ -84,6 +84,7 @@ func AuthMiddleware(ssoUrl string) gin.HandlerFunc {
// Check if authentication was successful
if ssoResp.Code != "OK" {
log.Error().Msgf("sso authentication failed, code: %s, message: %s", ssoResp.Code, ssoResp.Message)
utils.AssembleResponse(c, nil, utils.ErrUnauthorized)
c.Abort()
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment