~emersion/soju

c8d5c90d9d8a1031876705dc22d9e8f16cce43a1 — Simon Ser 1 year, 6 months ago 40a4056
downstream: improve SASL error logging
1 files changed, 2 insertions(+), 1 deletions(-)

M downstream.go
M downstream.go => downstream.go +2 -1
@@ 666,6 666,7 @@ func (dc *downstreamConn) handleMessageUnregistered(ctx context.Context, msg *ir
			}

			if err = auth.AuthPlain(ctx, dc.srv.db, username, password); err != nil {
				err = fmt.Errorf("%v (username %q)", err, username)
				break
			}
		case "OAUTHBEARER":


@@ 681,7 682,7 @@ func (dc *downstreamConn) handleMessageUnregistered(ctx context.Context, msg *ir
			}

			if credentials.oauthBearer.Username != "" && credentials.oauthBearer.Username != username {
				err = fmt.Errorf("username mismatch (server returned %q)", username)
				err = fmt.Errorf("username mismatch (client provided %q, but server returned %q)", credentials.oauthBearer.Username, username)
				break
			}
		default: