Not logged in. · Lost password · Register
Forum: XMPP Protocol RSS
Anonymous login
Avatar
kevin #1
User title: kevin
Member since Dec 2007 · 13 posts · Location: chengdu.china
Group memberships: Members
Show profile · Link to this post
Subject: Anonymous login
hi,Alex

    How can I anonymous login server?Could you give some code?

kevin
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
in the OnSaslStat event you can select the Sasl anonymous mechanism if your server supports anonymous login.
Most server don't support anonymous connections.

  1. private void XmppCon_OnSaslStart(object sender, SaslEventArgs args)
  2. {
  3.     args.Auto = false;
  4.     args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.ANONYMOUS);
  5. }

Alex
Avatar
kevin #3
User title: kevin
Member since Dec 2007 · 13 posts · Location: chengdu.china
Group memberships: Members
Show profile · Link to this post
thanks,Alex
    I'am Chinese new to agsXMPP,so my English proficiency is very bad .actually my many questions want to ask, but because the language question enables me not to have the confidence. Are you understand Chinese? Can I use Chinese when I ask the question?
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no, I speak no Chinese, only English and German.
There are many agsXMPP users in China. You can try to contact some of them. If you google for agsXMPP you also find many chinese websites.

Alex
Avatar
mikelindsey #5
Member since Aug 2009 · 2 posts · Location: Blairsville, GA
Group memberships: Members
Show profile · Link to this post
Hello Alex,

Is there an example of how to log on using sasl anonymous?

I've got this event wired:

private void XmppCon_OnSaslStart(object sender, SaslEventArgs args)
        {
            // You can define the SASL mechanism here when needed, or implement your own SASL mechanisms
            // for authentication

            args.Auto = false;
            args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.ANONYMOUS);
        }

I connect like so:

              
                this._XmppCon.Priority = 10;
                this._XmppCon.Port = 5222;
                this._XmppCon.UseSSL = false;
                this._XmppCon.ConnectServer = _xmppServer;
                this._XmppCon.AutoResolveConnectServer = false;             


                this._XmppCon.UseStartTLS = false;
              
                this._XmppCon.RegisterAccount = false;

                this._XmppCon.Open();

I get this in the debug:

SEND: <stream:stream to='' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="127.0.0.1" version="1.0" xml:lang="en" id="c836b52d" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>JIVE-SHAREDSECRET</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>

Thanks,
Michael Lindsey
Avatar
mikelindsey #6
Member since Aug 2009 · 2 posts · Location: Blairsville, GA
Group memberships: Members
Show profile · Link to this post
Subject: I apparently needed to set the xmppcon.server vs the xmppcon.ConnectServer
I apparently needed to set the xmppcon.Server vs the xmppcon.ConnectServer - once I set that it worked.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: