@Test public void principalChanged() { MockHttpServletRequest request = new MockHttpServletRequest(); assertFalse(filter.principalChanged(request, new TestingAuthenticationToken(new FederatedUser( "uid", "mock-idp", "John Doe", emptySet(), emptySet(), AuthorityUtils.createAuthorityList("USER")), "N/A") ) ); assertTrue(filter.principalChanged(request, new TestingAuthenticationToken(new RunAsFederatedUser( "uid", "mock-idp", "John Doe", emptySet(), emptySet(), AuthorityUtils.createAuthorityList("USER")), "N/A") ) ); request.addHeader(X_IMPERSONATE, true); assertTrue(filter.principalChanged(request, null)); }
@Override protected boolean principalChanged(HttpServletRequest request, Authentication currentAuthentication) { return hasText(getHeader(X_IMPERSONATE, request)) || currentAuthentication.getPrincipal() instanceof RunAsFederatedUser; }
ShibbolethPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected boolean principalChanged(HttpServletRequest request, Authentication currentAuthentication) { return hasText(getHeader(X_IMPERSONATE, request)) || currentAuthentication.getPrincipal() instanceof RunAsFederatedUser; } }
ShibbolethPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected boolean principalChanged(HttpServletRequest request, Authentication currentAuthentication) { return hasText(getHeader(X_IMPERSONATE, request)) || currentAuthentication.getPrincipal() instanceof RunAsFederatedUser; } ShibbolethPreAuthenticatedProcessingFilter(AuthenticationManager authenticationManager, Manage manage); }
ShibbolethPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected boolean principalChanged(HttpServletRequest request, Authentication currentAuthentication) { return hasText(getHeader(X_IMPERSONATE, request)) || currentAuthentication.getPrincipal() instanceof RunAsFederatedUser; } ShibbolethPreAuthenticatedProcessingFilter(AuthenticationManager authenticationManager, Manage manage);  }
ShibbolethPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected boolean principalChanged(HttpServletRequest request, Authentication currentAuthentication) { return hasText(getHeader(X_IMPERSONATE, request)) || currentAuthentication.getPrincipal() instanceof RunAsFederatedUser; } ShibbolethPreAuthenticatedProcessingFilter(AuthenticationManager authenticationManager, Manage manage);   }