}
List<GrantedAuthority> anonymousAuthorities = new ArrayList<GrantedAuthority>();
anonymousAuthorities.addAll(springSecurityAnonymousAuthorities);
anonymousAuthorities.addAll(jamwikiAnonymousAuthorities);
// replace the existing anonymous authentication object with the new authentication array
AnonymousAuthenticationToken jamwikiAuth = new AnonymousAuthenticationToken(this.getKey(), auth.getPrincipal(), anonymousAuthorities);
jamwikiAuth.setDetails(auth.getDetails());
jamwikiAuth.setAuthenticated(auth.isAuthenticated());
SecurityContextHolder.getContext().setAuthentication(jamwikiAuth);
}