Changeset 724 in code for trunk/user.go
- Timestamp:
- Nov 21, 2021, 3:10:54 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user.go
r722 r724 405 405 } 406 406 407 func (net *network) autoSaveSASLPlain(ctx context.Context, username, password string) { 408 // User may have e.g. EXTERNAL mechanism configured. We do not want to 409 // automatically erase the key pair or any other credentials. 410 if net.SASL.Mechanism != "" && net.SASL.Mechanism != "PLAIN" { 411 return 412 } 413 414 net.logger.Printf("auto-saving SASL PLAIN credentials with username %q", username) 415 net.SASL.Mechanism = "PLAIN" 416 net.SASL.Plain.Username = username 417 net.SASL.Plain.Password = password 418 if err := net.user.srv.db.StoreNetwork(ctx, net.user.ID, &net.Network); err != nil { 419 net.logger.Printf("failed to save SASL PLAIN credentials: %v", err) 420 } 421 } 422 407 423 type user struct { 408 424 User
Note:
See TracChangeset
for help on using the changeset viewer.