@Test public void createAuthentication() throws IOException { when(authenticationFactory.create(anyString())).thenReturn(authentication); Authentication result = filter.createAuthentication(request); assertSame(authentication, result); }
@Override protected Authentication createAuthentication(HttpServletRequest request) { try { Authentication auth = super.createAuthentication(request); AbstractAuthenticationToken authentication = anonymousAuthenticationFactory.create(authKey); authentication.setDetails(auth.getDetails()); return authentication; } catch (IOException e) { throw new AuthenticationServiceException(e.getMessage(), e); } }
DocumentrAnonymousAuthenticationFilter extends AnonymousAuthenticationFilter { @Override protected Authentication createAuthentication(HttpServletRequest request) { try { Authentication auth = super.createAuthentication(request); AbstractAuthenticationToken authentication = anonymousAuthenticationFactory.create(authKey); authentication.setDetails(auth.getDetails()); return authentication; } catch (IOException e) { throw new AuthenticationServiceException(e.getMessage(), e); } } }
DocumentrAnonymousAuthenticationFilter extends AnonymousAuthenticationFilter { @Override protected Authentication createAuthentication(HttpServletRequest request) { try { Authentication auth = super.createAuthentication(request); AbstractAuthenticationToken authentication = anonymousAuthenticationFactory.create(authKey); authentication.setDetails(auth.getDetails()); return authentication; } catch (IOException e) { throw new AuthenticationServiceException(e.getMessage(), e); } } DocumentrAnonymousAuthenticationFilter(); }
DocumentrAnonymousAuthenticationFilter extends AnonymousAuthenticationFilter { @Override protected Authentication createAuthentication(HttpServletRequest request) { try { Authentication auth = super.createAuthentication(request); AbstractAuthenticationToken authentication = anonymousAuthenticationFactory.create(authKey); authentication.setDetails(auth.getDetails()); return authentication; } catch (IOException e) { throw new AuthenticationServiceException(e.getMessage(), e); } } DocumentrAnonymousAuthenticationFilter();  }
DocumentrAnonymousAuthenticationFilter extends AnonymousAuthenticationFilter { @Override protected Authentication createAuthentication(HttpServletRequest request) { try { Authentication auth = super.createAuthentication(request); AbstractAuthenticationToken authentication = anonymousAuthenticationFactory.create(authKey); authentication.setDetails(auth.getDetails()); return authentication; } catch (IOException e) { throw new AuthenticationServiceException(e.getMessage(), e); } } DocumentrAnonymousAuthenticationFilter();   }