if (session != null) {
next.handle(null);
} else {
session = request.createSession();
WebContext webContext = new VertxWebContext(request);
// requested url to save
final String requestedUrlToSave = webContext.getFullRequestURL();
// this gets saved in the end of the request
session.putString("pac4jRequestedUrl", requestedUrlToSave);
try {