mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 23:02:15 +00:00
Tidying.
This commit is contained in:
parent
47dec4e597
commit
32038d8b92
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user