diff options
-rw-r--r-- | xmpp/router.go | 1 | ||||
-rw-r--r-- | xmpp/sasl.go | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/xmpp/router.go b/xmpp/router.go index 84256bb..9d69033 100644 --- a/xmpp/router.go +++ b/xmpp/router.go @@ -24,6 +24,7 @@ func getRoutingTable() routingTable { return routingTable{ {xml.Name{`http://etherx.jabber.org/streams`, `features`}, streamFeaturesHandler}, {xml.Name{`urn:ietf:params:xml:ns:xmpp-sasl`, `success`}, saslSuccessHandler}, + {xml.Name{`urn:ietf:params:xml:ns:xmpp-sasl`, `failure`}, saslFailureHandler}, } } diff --git a/xmpp/sasl.go b/xmpp/sasl.go index 23e8f3f..512fd58 100644 --- a/xmpp/sasl.go +++ b/xmpp/sasl.go @@ -68,3 +68,7 @@ func hasSaslPlain(e []xml.Token) bool { func saslSuccessHandler(s *session, e []xml.Token) { runStreamPair(s) } + +func saslFailureHandler(s *session, e []xml.Token) { + log.Println("SASL autentication failed!") +} |