]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.security.core/src/org/argeo/security/core/InternalAuthenticationProvider.java
Remove dependency to Spring Security
[lgpl/argeo-commons.git] / org.argeo.security.core / src / org / argeo / security / core / InternalAuthenticationProvider.java
diff --git a/org.argeo.security.core/src/org/argeo/security/core/InternalAuthenticationProvider.java b/org.argeo.security.core/src/org/argeo/security/core/InternalAuthenticationProvider.java
deleted file mode 100644 (file)
index 4b7e047..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.argeo.security.core;
-
-import org.springframework.security.authentication.AuthenticationProvider;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.AuthenticationException;
-
-public class InternalAuthenticationProvider implements AuthenticationProvider {
-       private String key;
-
-       public InternalAuthenticationProvider() {
-       }
-
-       public InternalAuthenticationProvider(String key) {
-               this.key = key;
-       }
-
-       @Override
-       public Authentication authenticate(Authentication arg0)
-                       throws AuthenticationException {
-               InternalAuthentication authentication = (InternalAuthentication) arg0;
-               if (authentication.getCredentials().toString().equals(key))
-                       return authentication;
-               return null;
-       }
-
-       public void setKey(String key) {
-               this.key = key;
-       }
-
-       @Override
-       public boolean supports(Class<?> authentication) {
-               return InternalAuthentication.class.isAssignableFrom(authentication);
-       }
-
-}