@Test public void testGetAuthenticatedCredentials() { ISecurityContext creds = (ISecurityContext) filter.getPreAuthenticatedCredentials(request); assertEquals(context, creds); }
@Override protected Object getPreAuthenticatedCredentials(HttpServletRequest request) { final String bearerToken = idTokenFactory.getBearerToken(request); if (StringUtils.isNotBlank(bearerToken)) { return bearerToken; } HttpSession session = request.getSession(false); if (session == null) { return null; } final IPerson person = personManager.getPerson(request); logger.debug("getPreAuthenticatedCredentials -- person=[{}]", person); return person.getSecurityContext(); }
PortalPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected Object getPreAuthenticatedCredentials(HttpServletRequest request) { final String bearerToken = idTokenFactory.getBearerToken(request); if (StringUtils.isNotBlank(bearerToken)) { return bearerToken; } HttpSession session = request.getSession(false); if (session == null) { return null; } final IPerson person = personManager.getPerson(request); logger.debug("getPreAuthenticatedCredentials -- person=[{}]", person); return person.getSecurityContext(); } }
PortalPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected Object getPreAuthenticatedCredentials(HttpServletRequest request) { final String bearerToken = idTokenFactory.getBearerToken(request); if (StringUtils.isNotBlank(bearerToken)) { return bearerToken; } HttpSession session = request.getSession(false); if (session == null) { return null; } final IPerson person = personManager.getPerson(request); logger.debug("getPreAuthenticatedCredentials -- person=[{}]", person); return person.getSecurityContext(); }  }
PortalPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected Object getPreAuthenticatedCredentials(HttpServletRequest request) { final String bearerToken = idTokenFactory.getBearerToken(request); if (StringUtils.isNotBlank(bearerToken)) { return bearerToken; } HttpSession session = request.getSession(false); if (session == null) { return null; } final IPerson person = personManager.getPerson(request); logger.debug("getPreAuthenticatedCredentials -- person=[{}]", person); return person.getSecurityContext(); }  @Autowired void setIdentitySwapperManager(IdentitySwapperManager identitySwapperManager); @Autowired void setPersonManager(IPersonManager personManager); @Autowired void setPersonService(PersonService personService); @Autowired void setAuthenticationService(Authentication authenticationService); @Autowired void setIdTokenFactory(IdTokenFactory idTokenFactory); void setClearSecurityContextPriorToPortalAuthentication(boolean b); @Autowired void setSecurityContextFactories(Set<ISecurityContextFactory> securityContextFactories); @Override void afterPropertiesSet(); void setLoginPath(String loginPath); void setLogoutPath(String logoutPath); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void setApplicationEventPublisher(
            ApplicationEventPublisher anApplicationEventPublisher); }
PortalPreAuthenticatedProcessingFilter extends AbstractPreAuthenticatedProcessingFilter { @Override protected Object getPreAuthenticatedCredentials(HttpServletRequest request) { final String bearerToken = idTokenFactory.getBearerToken(request); if (StringUtils.isNotBlank(bearerToken)) { return bearerToken; } HttpSession session = request.getSession(false); if (session == null) { return null; } final IPerson person = personManager.getPerson(request); logger.debug("getPreAuthenticatedCredentials -- person=[{}]", person); return person.getSecurityContext(); }  @Autowired void setIdentitySwapperManager(IdentitySwapperManager identitySwapperManager); @Autowired void setPersonManager(IPersonManager personManager); @Autowired void setPersonService(PersonService personService); @Autowired void setAuthenticationService(Authentication authenticationService); @Autowired void setIdTokenFactory(IdTokenFactory idTokenFactory); void setClearSecurityContextPriorToPortalAuthentication(boolean b); @Autowired void setSecurityContextFactories(Set<ISecurityContextFactory> securityContextFactories); @Override void afterPropertiesSet(); void setLoginPath(String loginPath); void setLogoutPath(String logoutPath); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void setApplicationEventPublisher(
            ApplicationEventPublisher anApplicationEventPublisher);  }