mirror of
https://github.com/1f349/lotus.git
synced 2024-12-22 16:14:07 +00:00
Respond incase of ok auth
This commit is contained in:
parent
675423c06e
commit
2918a32c1c
@ -74,14 +74,19 @@ func SetupApiServer(listen string, auth *AuthChecker, send Smtp, recv Imap) *htt
|
||||
return
|
||||
}
|
||||
|
||||
_ = authUser
|
||||
|
||||
// open imap client
|
||||
client, err := recv.MakeClient(authUser.Subject)
|
||||
if err != nil {
|
||||
_ = c.WriteJSON(map[string]string{"error": "Making client failed"})
|
||||
return
|
||||
}
|
||||
|
||||
// auth was ok
|
||||
err = c.WriteJSON(map[string]string{"auth": "ok"})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for {
|
||||
// authenticated users get longer to reply
|
||||
// a simple ping/pong setup bypasses this
|
||||
|
Loading…
Reference in New Issue
Block a user