Hi Emmanuel,
I think it could be interesting.
We could, for example, use these methods in Studio to display different types
of icons for connections.
It's not really a requirement, but it could be handy.
Regards,
Pierre-Arnaud
On 23 févr. 2010, at 17:20, Emmanuel Lecharny wrote:
> 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
>
>