• 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
invalid credentials
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

invalid credentials


  • Subject: invalid credentials
  • From: ".::welemski::." <email@hidden>
  • Date: Fri, 7 Oct 2005 10:53:37 +0800

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");
		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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: invalid credentials
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Formatter, WORepetition for rawRowsSQL results
  • Next by Date: Re: Wanting to return an .XML document for a direct action
  • Previous by thread: Re: Formatter, WORepetition for rawRowsSQL results
  • Next by thread: Re: invalid credentials
  • Index(es):
    • Date
    • Thread