Hi,
should we add some method in LdapConnection to inform the user about the
authentication ?
ie, isAnonymous(), isSimpleAuth(), isSaslAuth(), or even better
getAuthenticatedUser() returning the principal ?
// Anonymous connection
connection.bind();
if ( connection.isAnonymous() ) {
System.out.println( "anonymous" );
}
// Authenticated connection
connection.bind( "uid=admin,ou=system", "secret" );
if ( connection.isAnonymous() ) {
System.out.println( "anonymous" );
} else if ( connection.isSimpleAuth() ) {
System.out.println( "SimpleAuth for : " +
connection.getAuthenticatedUser() );
}
wdyt ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com