MCPcopy
hub / github.com/QuantumNous/new-api / Next

Method Next

common/email_ntlm_auth.go:51–71  ·  view source on GitHub ↗
(fromServer []byte, more bool)

Source from the content-addressed store, hash-verified

49}
50
51func (a *smtpAutoAuth) Next(fromServer []byte, more bool) ([]byte, error) {
52 if !more {
53 return nil, nil
54 }
55
56 switch a.mech {
57 case "LOGIN":
58 switch string(fromServer) {
59 case "Username:":
60 return []byte(a.username), nil
61 case "Password:":
62 return []byte(a.password), nil
63 default:
64 return nil, errors.New("unknown SMTP AUTH LOGIN challenge")
65 }
66 case "NTLM":
67 return ntlmssp.NewAuthenticateMessage(fromServer, a.username, a.password, nil)
68 default:
69 return nil, errors.New("unexpected SMTP auth challenge")
70 }
71}
72
73func smtpServerSupportsAuth(server *smtp.ServerInfo, mechanism string) bool {
74 if server == nil {

Callers 15

DisableCacheFunction · 0.45
CacheFunction · 0.45
TurnstileCheckFunction · 0.45
JimengRequestConvertFunction · 0.45
redisRateLimitHandlerFunction · 0.45
memoryRateLimitHandlerFunction · 0.45
ModelRequestRateLimitFunction · 0.45

Calls

no outgoing calls

Tested by 2