差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
java:ldap:spring [2016/04/19 18:06]
tony [Articles]
java:ldap:spring [2016/08/29 10:12]
tony
行 3: 行 3:
 ===== Articles ===== ===== Articles =====
   * [[java:​ldap:​spring:​simpleAuthentication|Simple Authentication]] SSL and StartTLS   * [[java:​ldap:​spring:​simpleAuthentication|Simple Authentication]] SSL and StartTLS
-  * [[java:​ldap:​spring:​supportSAMOfADProvider|Support SAM-Account-Name ​of AD Provider]]+  * [[java:​ldap:​spring:​object-relation|Spring-Security with LDAP物件關係]](整理中) 
 +  * ActiveDirectoryLdapAuthenticationProvider 
 +    * [[java:​ldap:​spring:​ActiveDirectoryLdapAuthenticationProvider:​supportSAMOfADProvider|Support SAM-Account-Name]] 
 +    * [[java:​ldap:​spring:​ActiveDirectoryLdapAuthenticationProvider:​supportTLS|Support TLS]] 
 +  * LdapAuthenticationProvider 
 +    * [[java:​ldap:​spring:​LdapAuthenticationProvider|如何透過LDAP做認證?​]] 
 +    * [[java:​ldap:​spring:​LdapAuthenticationProvider:​secureConnection|Support Secure connection]] 
 +    * [[java:​ldap:​spring:​LdapAuthenticationProvider:​anonymousWithTLS|Support StartTLS with anonymous login]]
 ==== Search AD User and Groups ==== ==== Search AD User and Groups ====
 <code java> <code java>
行 21: 行 28:
   
  ldapTemplate.search("​cn=Users",​ "​(objectclass=group)",​ sc, new NameClassPairCallbackHandler() {  ldapTemplate.search("​cn=Users",​ "​(objectclass=group)",​ sc, new NameClassPairCallbackHandler() {
-  
- @Override 
- public void handleNameClassPair(NameClassPair nameClassPair) { 
- System.out.println(nameClassPair.getName());​ 
- } 
- }); 
- 
- ldapTemplate.search("​cn=Users",​ "​(&​(objectClass=user)(userPrincipalName=test@test.ssm))",​ sc, new NameClassPairCallbackHandler() { 
-  
- @Override 
- public void handleNameClassPair(NameClassPair nameClassPair) { 
- System.out.println(nameClassPair.getName());​ 
- } 
- }); 
- 
- ldapTemplate.search("​cn=Users",​ "​(&​(objectClass=user)(samaccountname=tester))",​ sc, new NameClassPairCallbackHandler() { 
   
  @Override  @Override
行 44: 行 35:
  });  });
 </​code>​ </​code>​
- +===== To Do ===== 
 +  * Write: AD Provider支援TLS。 
 +  * Write: LDAP Provider Login with anonymous支援TLS。 
 +  * Write: SSL with HostVerifier。 
 +  * Write: Login LDAP with FullDN。 
 +  * Study: Connection Pool for TLS。
 ===== Resource ===== ===== Resource =====
   * [[http://​stackoverflow.com/​questions/​32501853/​catch-communicationexception-from-spring-security|catch-communicationexception-from-spring-security]]   * [[http://​stackoverflow.com/​questions/​32501853/​catch-communicationexception-from-spring-security|catch-communicationexception-from-spring-security]]
 +  * [[http://​docs.spring.io/​spring-ldap/​docs/​current/​reference/#​introduction|spring-ldap docs]]
  
 +=====  =====
 +----
 +\\
 +~~DISQUS~~