This commit is contained in:
Luke Taylor 2007-12-10 19:14:17 +00:00
parent 47dec4e597
commit 32038d8b92
1 changed files with 5 additions and 6 deletions

View File

@ -10,11 +10,11 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
/** /**
* An AuthenticationSource to retrieve authentication information stored in Spring Security's
* {@link SecurityContextHolder}.
* <p>
* This is a copy of Spring LDAP's AcegiAuthenticationSource, updated for use with Spring Security 2.0. * This is a copy of Spring LDAP's AcegiAuthenticationSource, updated for use with Spring Security 2.0.
* *
* An AuthenticationSource to retrieve authentication information stored in
* Spring Security's {@link SecurityContextHolder}.
*
* @author Mattias Arthursson * @author Mattias Arthursson
* @author Luke Taylor * @author Luke Taylor
* @since 2.0 * @since 2.0
@ -33,8 +33,7 @@ public class SpringSecurityAuthenticationSource implements AuthenticationSource
Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication == null) { if (authentication == null) {
log.warn("No Authentication object set in SecurityContext - " log.warn("No Authentication object set in SecurityContext - returning empty String as Principal");
+ "returning empty String as Principal");
return ""; return "";
} }
@ -54,7 +53,7 @@ public class SpringSecurityAuthenticationSource implements AuthenticationSource
} }
} }
/* /**
* @see org.springframework.ldap.core.AuthenticationSource#getCredentials() * @see org.springframework.ldap.core.AuthenticationSource#getCredentials()
*/ */
public String getCredentials() { public String getCredentials() {