Fixes to match TestingAuthenticationToken changes
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ public class PortletTestUtils {
|
||||
|
||||
public static void applyPortletRequestSecurity(MockPortletRequest request) {
|
||||
request.setRemoteUser(TESTUSER);
|
||||
request.setUserPrincipal(new TestingAuthenticationToken(TESTUSER, TESTCRED, null));
|
||||
request.setUserPrincipal(new TestingAuthenticationToken(TESTUSER, TESTCRED));
|
||||
request.addUserRole(PORTALROLE1);
|
||||
request.addUserRole(PORTALROLE2);
|
||||
// request.setAuthType(PortletRequest.FORM_AUTH);
|
||||
|
||||
+3
-3
@@ -166,8 +166,8 @@ public class PortletProcessingInterceptorTests extends TestCase {
|
||||
interceptor.setAuthenticationManager(new MockPortletAuthenticationManager());
|
||||
interceptor.afterPropertiesSet();
|
||||
|
||||
UsernamePasswordAuthenticationToken testingToken = new UsernamePasswordAuthenticationToken("dummy", "dummy", null);
|
||||
UsernamePasswordAuthenticationToken baselineToken = new UsernamePasswordAuthenticationToken("dummy", "dummy", null);
|
||||
UsernamePasswordAuthenticationToken testingToken = new UsernamePasswordAuthenticationToken("dummy", "dummy");
|
||||
UsernamePasswordAuthenticationToken baselineToken = new UsernamePasswordAuthenticationToken("dummy", "dummy");
|
||||
SecurityContextHolder.getContext().setAuthentication(testingToken);
|
||||
|
||||
// Execute preHandlerAction phase and verify results
|
||||
@@ -205,7 +205,7 @@ public class PortletProcessingInterceptorTests extends TestCase {
|
||||
// Build mock request and response
|
||||
MockActionRequest request = new MockActionRequest();
|
||||
MockActionResponse response = new MockActionResponse();
|
||||
request.setUserPrincipal(new TestingAuthenticationToken(PortletTestUtils.TESTUSER, PortletTestUtils.TESTCRED, null));
|
||||
request.setUserPrincipal(new TestingAuthenticationToken(PortletTestUtils.TESTUSER, PortletTestUtils.TESTCRED));
|
||||
request.setAuthType(PortletRequest.FORM_AUTH);
|
||||
|
||||
// Prepare and execute interceptor
|
||||
|
||||
Reference in New Issue
Block a user