(mech string)
| 103 | } |
| 104 | |
| 105 | func (s *Session) Auth(mech string) (sasl.Server, error) { |
| 106 | return s.endp.saslAuth.CreateSASL(mech, s.connState.RemoteAddr, func(identity string, data auth.ContextData) error { |
| 107 | s.connState.AuthUser = identity |
| 108 | s.connState.AuthPassword = data.Password |
| 109 | return nil |
| 110 | }), nil |
| 111 | } |
| 112 | |
| 113 | func (s *Session) Reset() { |
| 114 | s.msgLock.Lock() |