code: @Override
  	public Authentication doLogout() {
  		Authentication existing = getAuthentication();
  
  		// Make the Authentication object null if a SecureContext exists
  		SecurityContextHolder.getContext().setAuthentication(null);
  		setAuthentication(null);
  
  		getApplicationConfig().applicationContext().publishEvent(new AuthenticationEvent(null));
  		getApplicationConfig().applicationContext().publishEvent(new LogoutEvent(existing));
  
  		return existing;
  	}
docs: Perform a logout. Set the current authentication token to null (in both
  the per-thread security context and the global context), then publish an
  {@link AuthenticationEvent} followed by a {@link LogoutEvent}.
  
  @return Authentication token that was in place prior to the logout.
  @see ApplicationSecurityManager#doLogout()