samples/boot/findbyusername/src/main/java/sample/session/SessionDetailsFilter.java
@Override
	public void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		chain.doFilter(request, response);

		HttpSession session = request.getSession(false);
		if (session != null) {
			String remoteAddr = getRemoteAddress(request);
			String geoLocation = getGeoLocation(remoteAddr);

			SessionDetails details = new SessionDetails();
			details.setAccessType(request.getHeader("User-Agent"));
			details.setLocation(remoteAddr + " " + geoLocation);

			session.setAttribute("SESSION_DETAILS", details);
		}
	}
@Override
	public void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		chain.doFilter(request, response);

		HttpSession session = request.getSession(false);
		if (session != null) {
			String remoteAddr = getRemoteAddress(request);
			String geoLocation = getGeoLocation(remoteAddr);

			SessionDetails details = new SessionDetails();
			details.setAccessType(request.getHeader("User-Agent"));
			details.setLocation(remoteAddr + " " + geoLocation);

			session.setAttribute("SESSION_DETAILS", details);
		}
	}
tag::dofilterinternal[]