소스 검색

SEC-643: Fix to allow namespace configuration without remember-me authentication.

Luke Taylor 17 년 전
부모
커밋
b9561cc4e0
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      core/src/main/java/org/springframework/security/config/HttpSecurityConfigPostProcessor.java

+ 6 - 1
core/src/main/java/org/springframework/security/config/HttpSecurityConfigPostProcessor.java

@@ -66,7 +66,12 @@ public class HttpSecurityConfigPostProcessor implements BeanFactoryPostProcessor
 
         RememberMeServices rememberMeServices = null;
 
-        if (beans.size() > 0) {
+        if(beans.size() == 0) {
+            logger.debug("No RememberMeServices configured");
+            return;
+        }
+
+        if (beans.size() == 1) {
             rememberMeServices = (RememberMeServices) beans.values().toArray()[0];
         } else {
             throw new SecurityConfigurationException("More than one RememberMeServices bean found.");