Bonjour à tous,
je suis sur le point de mettre en place une solution d'authentifications uniques pour acceeder a des applications web en se basant sur un annuaire LDAP . et je cherche la documenattion sur les solution possible
Merci :D
Version imprimable
Bonjour à tous,
je suis sur le point de mettre en place une solution d'authentifications uniques pour acceeder a des applications web en se basant sur un annuaire LDAP . et je cherche la documenattion sur les solution possible
Merci :D
tous les serveurs d'applications permettent de gerer l'authentification sur un annuaire LDAP. (voir docs de ton serveur d'appli)Citation:
Envoyé par imsory
sinon tu peut toujours coder a la main ton authentification en faisant un bind sur le LDAP.
@+Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 // bind user env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory") ; env.put(Context.PROVIDER_URL, serveurUrl); env.put(Context.SECURITY_AUTHENTICATION,"simple"); env.put(Context.SECURITY_PRINCIPAL, userDN); env.put(Context.SECURITY_CREDENTIALS, password); try { ctx = new InitialDirContext(env); return true;//ICI OK couple login/pass correct } catch (AuthenticationException e) { return false; } catch (Exception e) { throw new AppException(e); } finally { try { if (ctx != null)ctx.close(); } catch (Exception e) { } }