Commit fb63c3d1 authored by ale's avatar ale

Add some error logging on saml-server

parent 65b137a4
Pipeline #6651 passed with stages
in 4 minutes and 14 seconds
......@@ -180,6 +180,7 @@ func (b *userFileBackend) GetSession(w http.ResponseWriter, r *http.Request, req
// configuration, is also verified at this stage.
username := httpsso.Username(r)
if username == "" {
log.Printf("error: could not retrieve user from SSO")
http.Error(w, "No user found", http.StatusInternalServerError)
return nil
}
......@@ -191,6 +192,7 @@ func (b *userFileBackend) GetSession(w http.ResponseWriter, r *http.Request, req
user, ok := b.users[username]
if !ok {
log.Printf("error: user %s is authenticated but unknown", username)
http.Error(w, "User not found", http.StatusInternalServerError)
return nil
}
......
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