Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: xmpp single sign on sso

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question xmpp single sign on sso

    Hello,

    i want to build a very simple xmpp message listener. i start with this:

    http://www.javaprogrammingforums.com...smack-api.html

    that works great. but i want to authenticate my user with the windows active directory user. but how can i implement this?

    the goal is a xmpp client, thats starts automaticly and auth with the ad user and login some chat channels and a small pop have to come, when a new message is in one of this channels.

    i hope you can help me.

    thanks!


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: xmpp single sign on sso

    I'm sure this will be quite complicated.

    I have done some research into Java communicating with Active Directory and found this useful information:

    OTN Discussion Forums : JNDI, Active Directory and ...

    Using JAVA code with Active Directory - JefTek.com

    OpenLDAP, Java LDAP
    OpenLDAP, JDBC-LDAP Bridge Driver

    I have never used this before so other than this, I'm not sure how much I can help.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: xmpp single sign on sso

       XMPPConnection connection;
        SASLAuthentication auth;
        public void login(String userName, String password) throws XMPPException
        {
    	    ConnectionConfiguration config = new ConnectionConfiguration("testjabber",5222, "Work");
    	    connection = new XMPPConnection(config);
    	    connection.connect();
    	    System.out.println(SASLAuthentication.getRegisterSASLMechanisms());
    	    connection.login(userName,"");
        }

    I think the Problem is, he dont use the GSSAPI mechanism. He only use the PLAIN method:


    [class org.jivesoftware.smack.sasl.SASLGSSAPIMechanism, class org.jivesoftware.smack.sasl.SASLDigestMD5Mechanism, class org.jivesoftware.smack.sasl.SASLCramMD5Mechanism, class org.jivesoftware.smack.sasl.SASLPlainMechanism, class org.jivesoftware.smack.sasl.SASLAnonymous]
    Exception in thread "main" SASL authentication failed using mechanism PLAIN: 
    	at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:325)
    	at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)
    	at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:349)
    	at JabberSmackAPI.login(JabberSmackAPI.java:25)
    	at JabberSmackAPI.main(JabberSmackAPI.java:70)

    but i dont know why?

Similar Threads

  1. How to Write a simple XMPP (Jabber) client using the Smack API
    By JavaPF in forum Java Networking Tutorials
    Replies: 35
    Last Post: August 5th, 2014, 12:59 AM
  2. Replies: 3
    Last Post: April 11th, 2011, 09:51 PM
  3. sign XML with WS-Security
    By splendes in forum Java SE APIs
    Replies: 1
    Last Post: October 6th, 2010, 08:49 AM
  4. How do I privately sign my applet?
    By AlphaWhelp in forum Java Theory & Questions
    Replies: 1
    Last Post: December 16th, 2009, 09:42 AM

Tags for this Thread