SEC-665: Missed a method name...

This commit is contained in:
Luke Taylor 2008-02-08 18:19:27 +00:00
parent bd5a64825d
commit e0d0cc20c7
5 changed files with 10 additions and 10 deletions

View File

@ -25,7 +25,7 @@ public class SimpleMappableAttributesRetriever implements MappableAttributesRetr
return copy;
}
public void setMappableRoles(String[] aMappableRoles) {
public void setMappableAttributes(String[] aMappableRoles) {
this.mappableRoles = new String[aMappableRoles.length];
System.arraycopy(aMappableRoles, 0, mappableRoles, 0, mappableRoles.length);
}

View File

@ -32,9 +32,9 @@ public class UserDetailsByNameServiceWrapper implements AuthenticationUserDetail
* Get the UserDetails object from the wrapped UserDetailsService
* implementation
*/
public UserDetails loadUserDetails(Authentication aJ2eeAuthenticationToken) throws UsernameNotFoundException,
public UserDetails loadUserDetails(Authentication authentication) throws UsernameNotFoundException,
DataAccessException {
return userDetailsService.loadUserByUsername(aJ2eeAuthenticationToken.getName());
return userDetailsService.loadUserByUsername(authentication.getName());
}
/**

View File

@ -60,8 +60,8 @@ public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource extends Aut
/**
* Get a list of Granted Authorities based on the current user's J2EE roles.
*
* @param request
* The HttpServletRequest
* @param request The request against which <tt>isUserInRole</tt> will be called for each role name
* returned by the MappableAttributesRetriever.
* @return GrantedAuthority[] mapped from the user's J2EE roles.
*/
private GrantedAuthority[] getJ2eeBasedGrantedAuthorities(HttpServletRequest request) {

View File

@ -6,7 +6,7 @@ import java.util.Collection;
import junit.framework.TestCase;
/**
*
*
* @author TSARDD
* @since 18-okt-2007
*/
@ -15,7 +15,7 @@ public class SimpleMappableRolesRetrieverTests extends TestCase {
public final void testGetSetMappableRoles() {
String[] roles = new String[] { "Role1", "Role2" };
SimpleMappableAttributesRetriever r = new SimpleMappableAttributesRetriever();
r.setMappableRoles(roles);
r.setMappableAttributes(roles);
String[] result = r.getMappableAttributes();
Collection resultColl = Arrays.asList(result);
Collection rolesColl = Arrays.asList(roles);

View File

@ -19,7 +19,7 @@ import org.springframework.security.GrantedAuthority;
import org.springframework.mock.web.MockHttpServletRequest;
/**
*
*
* @author TSARDD
* @since 18-okt-2007
*/
@ -122,7 +122,7 @@ public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSourceTests extend
private MappableAttributesRetriever getMappableRolesRetriever(String[] mappedRoles) {
SimpleMappableAttributesRetriever result = new SimpleMappableAttributesRetriever();
result.setMappableRoles(mappedRoles);
result.setMappableAttributes(mappedRoles);
return result;
}
@ -134,7 +134,7 @@ public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSourceTests extend
result.setRolePrefix("");
return result;
}
private final HttpServletRequest getRequest(final String userName,final String[] aRoles)
{
MockHttpServletRequest req = new MockHttpServletRequest() {