X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.core%2Fsrc%2Forg%2Fargeo%2Fsecurity%2Fcore%2FInternalAuthenticationProvider.java;fp=org.argeo.security.core%2Fsrc%2Forg%2Fargeo%2Fsecurity%2Fcore%2FInternalAuthenticationProvider.java;h=0000000000000000000000000000000000000000;hb=86140b8db15a11cfd942892eface6a4f90329a41;hp=4b7e047baecbd5fe0ee843bec8fbc670b4dad37f;hpb=2b3904582518de706357fd2a8216a47ca77dfc39;p=lgpl%2Fargeo-commons.git 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 index 4b7e047ba..000000000 --- a/org.argeo.security.core/src/org/argeo/security/core/InternalAuthenticationProvider.java +++ /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); - } - -}