Ver Fonte

License header added.

Luke Taylor há 20 anos atrás
pai
commit
918fc7c15a

+ 15 - 0
core/src/main/java/org/acegisecurity/providers/x509/X509AuthenticationProvider.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509;
 
 import net.sf.acegisecurity.providers.AuthenticationProvider;

+ 15 - 0
core/src/main/java/org/acegisecurity/providers/x509/X509AuthenticationToken.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509;
 
 import net.sf.acegisecurity.providers.AbstractAuthenticationToken;

+ 16 - 1
core/src/main/java/org/acegisecurity/providers/x509/X509AuthoritiesPopulator.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509;
 
 import net.sf.acegisecurity.UserDetails;
@@ -34,7 +49,7 @@ public interface X509AuthoritiesPopulator {
      * @throws net.sf.acegisecurity.AuthenticationException if the user details are not available
      *  or the certificate isn't valid for the application's purpose.
      */
-    public UserDetails getUserDetails(X509Certificate userCertificate)
+    UserDetails getUserDetails(X509Certificate userCertificate)
         throws AuthenticationException;
 
 }

+ 15 - 0
core/src/main/java/org/acegisecurity/providers/x509/X509UserCache.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509;
 
 import net.sf.acegisecurity.UserDetails;

+ 18 - 2
core/src/main/java/org/acegisecurity/ui/x509/X509ProcessingFilter.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.ui.x509;
 
 import net.sf.acegisecurity.ui.AbstractProcessingFilter;
@@ -19,6 +34,7 @@ import java.io.IOException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.InitializingBean;
+import org.springframework.util.Assert;
 
 /**
  * Processes the X.509 certificate submitted by a client browser
@@ -40,6 +56,7 @@ import org.springframework.beans.factory.InitializingBean;
  * </p>
  *
  * @author Luke Taylor
+ * @version $Id$
  */
 public class X509ProcessingFilter implements Filter, InitializingBean {
     //~ Static fields/initializers =============================================
@@ -57,8 +74,7 @@ public class X509ProcessingFilter implements Filter, InitializingBean {
     }
 
     public void afterPropertiesSet() throws Exception {
-        if(authenticationManager == null)
-            throw new IllegalArgumentException("An AuthenticationManager must be set");
+        Assert.notNull(authenticationManager, "An AuthenticationManager must be set");
     }
 
     /**

+ 17 - 0
core/src/main/java/org/acegisecurity/ui/x509/X509ProcessingFilterEntryPoint.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.ui.x509;
 
 import net.sf.acegisecurity.intercept.web.AuthenticationEntryPoint;
@@ -34,6 +49,8 @@ public class X509ProcessingFilterEntryPoint implements AuthenticationEntryPoint
 
     private static final Log logger = LogFactory.getLog(X509ProcessingFilterEntryPoint.class);
 
+    //~ Methods ================================================================
+    
     /**
      * Returns a 403 error code to the client.
      */

+ 15 - 0
core/src/test/java/org/acegisecurity/providers/x509/X509AuthenticationProviderTests.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509;
 
 import junit.framework.TestCase;

+ 15 - 0
core/src/test/java/org/acegisecurity/providers/x509/X509AuthenticationTokenTests.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509;
 
 import junit.framework.TestCase;

+ 15 - 0
core/src/test/java/org/acegisecurity/providers/x509/X509TestUtils.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509;
 
 import java.security.cert.X509Certificate;

+ 15 - 0
core/src/test/java/org/acegisecurity/providers/x509/populator/DaoX509AuthoritiesPopulatorTests.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.providers.x509.populator;
 
 import junit.framework.TestCase;

+ 15 - 0
core/src/test/java/org/acegisecurity/ui/x509/X509ProcessingFilterTests.java

@@ -1,3 +1,18 @@
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package net.sf.acegisecurity.ui.x509;
 
 import junit.framework.TestCase;