1 package org
.argeo
.security
.core
;
3 import org
.springframework
.security
.authentication
.AuthenticationProvider
;
4 import org
.springframework
.security
.core
.Authentication
;
5 import org
.springframework
.security
.core
.AuthenticationException
;
7 public class InternalAuthenticationProvider
implements AuthenticationProvider
{
10 public InternalAuthenticationProvider() {
13 public InternalAuthenticationProvider(String key
) {
18 public Authentication
authenticate(Authentication arg0
)
19 throws AuthenticationException
{
20 InternalAuthentication authentication
= (InternalAuthentication
) arg0
;
21 if (authentication
.getCredentials().toString().equals(key
))
22 return authentication
;
26 public void setKey(String key
) {
31 public boolean supports(Class
<?
> authentication
) {
32 return InternalAuthentication
.class.isAssignableFrom(authentication
);