Comments (3)
Apparently, this never worked with SASL. What sort of action are you going to
take
in OnLoginRequired? I'm trying to picture the use case so I can figure out how
the
API should change. I guess I could add a new state, and make the Login() method
start the SASL process when you're in that state.
Original comment by [email protected]
on 31 Mar 2008 at 8:18
from jabber-net.
What I am looking to do is simply register a user. This is within a welcome
screen that prompts the user to create an account. Looking into the issue
further:
If username and password are null, then this happens:
SND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams"
id="cd16dc41" xmlns="jabber:client" to="robbiehanson.com" version="1.0">
Warning: overriding existing packet factory
RCV: <?xml version='1.0'?><stream:stream xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams' id='1490986094'
from='robbiehanson.com' version='1.0' xml:lang='en'>
RCV: <stream:features><mechanisms
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>DIGEST-MD5</mechanism><mecha
nism>PLAIN</mechanism></mechanisms><register
xmlns='http://jabber.org/features/iq-
register'/></stream:features>
SND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RCV: <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>...</challenge>
jabberClient_OnError: jabber.connection.sasl.SASLException: Missing SASL
username directive
Now if we check for a SASLException in the OnError method, and call Register at
this point, we get an infinite loop:
[...the same stream opening sequence and features as above...]
SND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RCV: <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>...</challenge>
jabberClient_OnError: jabber.connection.sasl.SASLException: Missing SASL
username directive
SND: <iq id="JN_1" type="get" to="robbiehanson.com"><query
xmlns="jabber:iq:register"><username>johndoe</username></query></iq>
RCV: <iq from='robbiehanson.com' id='JN_1' type='result'><query
xmlns='jabber:iq:register'><instructions>...</instructions><username/><password/
></query></iq>
jabberClient_OnError: jabber.connection.sasl.SASLException: Invalid SASL
protocol
SND: <iq id="JN_2" type="get" to="robbiehanson.com"><query
xmlns="jabber:iq:register"><username>johndoe</username></query></iq>
RCV: <iq from='robbiehanson.com' id='JN_2' type='result'><query
xmlns='jabber:iq:register'><instructions>...</instructions><username/><password/
></query></iq>
jabberClient_OnError: jabber.connection.sasl.SASLException: Invalid SASL
protocol
...etc
Now if we instead use an empty string for both username and password, then we
get this:
[...the same stream opening sequence and features as above...]
SND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RCV: <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>...</challenge>
SND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...</response>
RCV: <failure
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>
jabberClient_OnError: jabber.connection.sasl.AuthenticationFailedException:
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized /></failure>
And registering at this point will work correctly:
[...the same stream opening sequence and features as above...]
SND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RCV: <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>...</challenge>
SND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">...</response>
RCV: <failure
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><not-authorized/></failure>
jabberClient_OnError: jabber.connection.sasl.AuthenticationFailedException:
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized /></failure>
SND: <iq id="JN_1" type="get" to="robbiehanson.com"><query
xmlns="jabber:iq:register"><username>johndoe</username></query></iq>
RCV: <iq from='robbiehanson.com' id='JN_1' type='result'><query
xmlns='jabber:iq:register'><instructions>...</instructions><username/><password/
></query></iq>
jabberClient_OnRegisterInfo
SND: <iq type="set" id="JN_2" to="robbiehanson.com"><query
xmlns="jabber:iq:register"><instructions>...</instructions><username>johndoe</us
ername><password>...</password></query></iq>
RCV: <iq from='robbiehanson.com' id='JN_2' type='result'><query
xmlns='jabber:iq:register'><instructions>..</instructions><username>johndoe</use
rname><password>...</password></query></iq>
jabberClient_OnRegistered
I should note, that all of these examples had AutoLogin set to false.
Also, I had an event setup for OnLoginRequired, which was never called. I
tested it multiple times to be sure.
Let me know if there's anything else I can answer for you.
Original comment by [email protected]
on 1 Apr 2008 at 1:21
from jabber-net.
Fixed. Just call Login() when you're done with registration.
Original comment by [email protected]
on 17 Apr 2008 at 7:54
- Changed state: Fixed
from jabber-net.
Related Issues (20)
- Large message takes too long to be sent
- System.Collections.Generic.KeyNotFoundException
- Jabber-net does not work with Openfire on Windows 8 Pro HOT 1
- JabberNet-2.1.0.710.msi can`t be installed on Windows 8 Ent x64 HOT 1
- In XMPP dialback google returns gmail.com instead of google.com for hosted domains
- Not being able to debug in debug nor release mode HOT 1
- Jabber client issue while authenticating connect in c# HOT 1
- [deleted issue]
- Faulty version detection in the installer HOT 1
- [deleted issue]
- How to Implement XEP-0012
- Use HTTP-Binding Connect To Openfire -> Never get an response
- DNS SRV lookups fail on a 64bit machine with >32bit address space (A connection attempt failed because ...)
- Setup project for Visual Studio 2010/2013
- Sending a message to a chatroom HOT 2
- Must provide null initial value for required parameters : Main.cs
- System.AccessViolationException' occurred in jabber-net.dll
- trouble on login
- Google talk not connecting with transparent proxy settings.
- sasl.athenticationfailedexception
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jabber-net.