> Hi,
>
[quoted text clipped - 13 lines]
> private String authenticationMethod = "simple";
> private String providerUrl = "ldap://ldap:636";
the format is protocol://hostname:port. If your ldap server is called "ldap"
this should be ok. Also, remember that 636 implies that the server is
configured to handle SSL, so you will need:
env.put(Context.SECURITY_PROTOCOL, "ssl");
added to the environment.
> public LdapAuthentication() {
> super();
[quoted text clipped - 26 lines]
> env.put(Context.SECURITY_PRINCIPAL, username);
> env.put(Context.SECURITY_CREDENTIALS, password);
The SECURITY_CREDENTIALS should be set to a byte array, so use
password.getBytes() here.
> DirContext ctx = new InitialDirContext(env);
> return ctx;
>
> }
> }
Appart from those couple of points, it looks ok.

Signature
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555