summaryrefslogtreecommitdiff
path: root/xmpp/sasl.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-05-22 21:22:32 +0200
committerxengineering <me@xengineering.eu>2023-05-22 21:22:32 +0200
commitc39b4f6bf147aca788dc02832a985700b6e4eba9 (patch)
treef39fd6d520802ef971fcb51ba841022b760e4ecb /xmpp/sasl.go
parentefd5c81ca00136d3a673d99e699f16d050fcfaa6 (diff)
downloadlimox-c39b4f6bf147aca788dc02832a985700b6e4eba9.tar
limox-c39b4f6bf147aca788dc02832a985700b6e4eba9.tar.zst
limox-c39b4f6bf147aca788dc02832a985700b6e4eba9.zip
Act on SASL server response
Diffstat (limited to 'xmpp/sasl.go')
-rw-r--r--xmpp/sasl.go9
1 files changed, 9 insertions, 0 deletions
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")
+}