• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: invalid credentials
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invalid credentials


  • Subject: Re: invalid credentials
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 7 Oct 2005 11:19:37 -0700


On Oct 6, 2005, at 7:53 PM, .::welemski::. wrote:

Hi,

I tried binding to ldap using this syntax in webobjects

String strCredentials;

    //    strCredentials="uid="+varUsername+",cn=users";

        // Set up environment for creating initial context
        Hashtable env = new Hashtable(11);
        env.put(Context.INITIAL_CONTEXT_FACTORY,
                "com.sun.jndi.ldap.LdapCtxFactory");
        env.put(Context.PROVIDER_URL,
"ldap://server.domain.com:389/dc=server,dc=comainl,dc=com";);

// Authenticate as S. User and password "mysecret"
env.put(Context.SECURITY_AUTHENTICATION, "simple");
//env.put(Context.SECURITY_PRINCIPAL, "cn=S. User, ou=NewHires,
o=JNDITutorial");
env.put(Context.SECURITY_PRINCIPAL, "cn=Directory
Administrator,dc=domain,dc=com");

try userid=<user id> instead of cn=Directory Administrator


Chuck

        env.put(Context.SECURITY_CREDENTIALS, "mypassword");

        try {
            // Create initial context
            DirContext ctx = new InitialDirContext(env);

            System.out.println(ctx.lookup("ou=People"));

            // do something useful with ctx
            varResult=":D";
            // Close the context when we're done
            ctx.close();
        } catch (NamingException e) {
            varResult=":(";
            e.printStackTrace();
        }


but I get an error, "Invalid Credentials". my password is correct
--
 -- -- -- -- -- -- -- -- -- -- --
welemski
 -- -- -- -- -- -- -- -- -- -- --
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden

--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >invalid credentials (From: ".::welemski::." <email@hidden>)

  • Prev by Date: D2W SelectPageInterface and NextPageDelegate
  • Next by Date: Re: deleteSelection sets relationship null rather than deleting
  • Previous by thread: invalid credentials
  • Next by thread: D2W SelectPageInterface and NextPageDelegate
  • Index(es):
    • Date
    • Thread