mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 23:02:15 +00:00
SEC-665: Missed a method name...
This commit is contained in:
parent
bd5a64825d
commit
e0d0cc20c7
@ -25,7 +25,7 @@ public class SimpleMappableAttributesRetriever implements MappableAttributesRetr
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMappableRoles(String[] aMappableRoles) {
|
public void setMappableAttributes(String[] aMappableRoles) {
|
||||||
this.mappableRoles = new String[aMappableRoles.length];
|
this.mappableRoles = new String[aMappableRoles.length];
|
||||||
System.arraycopy(aMappableRoles, 0, mappableRoles, 0, mappableRoles.length);
|
System.arraycopy(aMappableRoles, 0, mappableRoles, 0, mappableRoles.length);
|
||||||
}
|
}
|
||||||
|
@ -32,9 +32,9 @@ public class UserDetailsByNameServiceWrapper implements AuthenticationUserDetail
|
|||||||
* Get the UserDetails object from the wrapped UserDetailsService
|
* Get the UserDetails object from the wrapped UserDetailsService
|
||||||
* implementation
|
* implementation
|
||||||
*/
|
*/
|
||||||
public UserDetails loadUserDetails(Authentication aJ2eeAuthenticationToken) throws UsernameNotFoundException,
|
public UserDetails loadUserDetails(Authentication authentication) throws UsernameNotFoundException,
|
||||||
DataAccessException {
|
DataAccessException {
|
||||||
return userDetailsService.loadUserByUsername(aJ2eeAuthenticationToken.getName());
|
return userDetailsService.loadUserByUsername(authentication.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,8 +60,8 @@ public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource extends Aut
|
|||||||
/**
|
/**
|
||||||
* Get a list of Granted Authorities based on the current user's J2EE roles.
|
* Get a list of Granted Authorities based on the current user's J2EE roles.
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request The request against which <tt>isUserInRole</tt> will be called for each role name
|
||||||
* The HttpServletRequest
|
* returned by the MappableAttributesRetriever.
|
||||||
* @return GrantedAuthority[] mapped from the user's J2EE roles.
|
* @return GrantedAuthority[] mapped from the user's J2EE roles.
|
||||||
*/
|
*/
|
||||||
private GrantedAuthority[] getJ2eeBasedGrantedAuthorities(HttpServletRequest request) {
|
private GrantedAuthority[] getJ2eeBasedGrantedAuthorities(HttpServletRequest request) {
|
||||||
|
@ -15,7 +15,7 @@ public class SimpleMappableRolesRetrieverTests extends TestCase {
|
|||||||
public final void testGetSetMappableRoles() {
|
public final void testGetSetMappableRoles() {
|
||||||
String[] roles = new String[] { "Role1", "Role2" };
|
String[] roles = new String[] { "Role1", "Role2" };
|
||||||
SimpleMappableAttributesRetriever r = new SimpleMappableAttributesRetriever();
|
SimpleMappableAttributesRetriever r = new SimpleMappableAttributesRetriever();
|
||||||
r.setMappableRoles(roles);
|
r.setMappableAttributes(roles);
|
||||||
String[] result = r.getMappableAttributes();
|
String[] result = r.getMappableAttributes();
|
||||||
Collection resultColl = Arrays.asList(result);
|
Collection resultColl = Arrays.asList(result);
|
||||||
Collection rolesColl = Arrays.asList(roles);
|
Collection rolesColl = Arrays.asList(roles);
|
||||||
|
@ -122,7 +122,7 @@ public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSourceTests extend
|
|||||||
|
|
||||||
private MappableAttributesRetriever getMappableRolesRetriever(String[] mappedRoles) {
|
private MappableAttributesRetriever getMappableRolesRetriever(String[] mappedRoles) {
|
||||||
SimpleMappableAttributesRetriever result = new SimpleMappableAttributesRetriever();
|
SimpleMappableAttributesRetriever result = new SimpleMappableAttributesRetriever();
|
||||||
result.setMappableRoles(mappedRoles);
|
result.setMappableAttributes(mappedRoles);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user