From c39b4f6bf147aca788dc02832a985700b6e4eba9 Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 22 May 2023 21:22:32 +0200 Subject: Act on SASL server response --- xmpp/sasl.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xmpp/sasl.go') diff --git a/xmpp/sasl.go b/xmpp/sasl.go index cbc1f11..91cbf6b 100644 --- a/xmpp/sasl.go +++ b/xmpp/sasl.go @@ -48,3 +48,12 @@ func sendSaslAuth(b []xml.Token, c *Conn) error { return errors.New("No compatible SASL mechanism given") } + +func onSaslSuccess(b []xml.Token, c *Conn) error { + sendStreamStart(&c.enc, c.jid) + return nil +} + +func onSaslFailure(b []xml.Token, c *Conn) error { + return errors.New("Authentication failed") +} -- cgit v1.2.3-70-g09d2