Skip to content

Commit 6ef80e8

Browse files
committed
Unbreak tests
1 parent ca44d0e commit 6ef80e8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

internal/auth/sasl.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ func (s *SASLAuth) SASLMechanisms() []string {
6666
}
6767

6868
func (s *SASLAuth) usernameForAuth(ctx context.Context, saslUsername string) (string, error) {
69-
saslUsername, err := s.AuthNormalize(saslUsername)
70-
if err != nil {
71-
return "", err
69+
if s.AuthNormalize != nil {
70+
var err error
71+
saslUsername, err = s.AuthNormalize(saslUsername)
72+
if err != nil {
73+
return "", err
74+
}
7275
}
7376

7477
if s.AuthMap == nil {

0 commit comments

Comments
 (0)