directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nowhere <spina.r...@gmail.com>
Subject Re: ApacheDs - DIGEST-MD5
Date Wed, 18 Feb 2009 11:08:09 GMT

Thanks Emmanuel...now it's working fine, I appreciate much your help, made me
glad :)
I was thinking realm was implicit...what a stupid I am!
Have e good day!


Emmanuel Lecharny wrote:
> 
> Hi,
> 
> On Wed, Feb 18, 2009 at 11:34 AM, Nowhere <spina.rosa@gmail.com> wrote:
>>
>> Hi all,
>> I don't know if this is the right place, but I have a problem connecting
>> my
>> ApacheDS using DIGEST-MD5:
>>
>> i wrote a simple java class that works fine with simple authentication.
>> Here it's:
>> public static void main(String[] args) throws NamingException {
>>
>>        if (args.length < 2) {
>>            System.err.println("Usage: java AdvancedBindDemo <uid>
>> <password>");
>>            System.exit(1);
>>        }
>>
>>        Hashtable env = new Hashtable();
>>        env.put(Context.INITIAL_CONTEXT_FACTORY,
>> "com.sun.jndi.ldap.LdapCtxFactory");
>>        env.put(Context.PROVIDER_URL, "ldap://localhost:10389/");
>>        env.put(Context.SECURITY_AUTHENTICATION, "simple");
>>        env.put(Context.SECURITY_PRINCIPAL, "cn=admin,dc=example,dc=com");
>>        env.put(Context.SECURITY_CREDENTIALS, "admin");
> 
> You have to define two more element in your configuration :
> 
>          // Specify realm
>          env.put( "java.naming.security.sasl.realm", "example.com" );
> 
>          // Request privacy protection
>          env.put( "javax.security.sasl.qop", "auth-conf" );
> 
> 
> -- 
> Regards,
> Cordialement,
> Emmanuel L├ęcharny
> www.iktek.com
> 
> 

-- 
View this message in context: http://www.nabble.com/ApacheDs---DIGEST-MD5-tp22076098p22076520.html
Sent from the Apache Directory Project mailing list archive at Nabble.com.


Mime
View raw message