// Path: src/main/java/org/audit4j/microservice/ServerConfiguration.java
// public class ServerConfiguration extends Configuration {
// 
//     private List<Transport> transports = new ArrayList<>();
//     
//     public List<Transport> getTransports() {
//         return transports;
//     }
// 
//     public void setTransports(List<Transport> transports) {
//         this.transports = transports;
//     }
// 
//     @Override
//     public String toString() {
//         return "ServerConfiguration [transports=" + transports + "]";
//     }
// }


import org.audit4j.microservice.ServerConfiguration;
import io.vertx.core.Vertx;
import io.vertx.ext.auth.AuthProvider;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.handler.BodyHandler;
import io.vertx.ext.web.handler.CookieHandler;
import io.vertx.ext.web.handler.FormLoginHandler;
import io.vertx.ext.web.handler.RedirectAuthHandler;
import io.vertx.ext.web.handler.SessionHandler;
import io.vertx.ext.web.handler.UserSessionHandler;
import io.vertx.ext.web.sstore.LocalSessionStore;
package org.audit4j.microservice.web;



public class WebRouter {

    Vertx vertx;
    
    public WebRouter(Vertx vertx) {
        this.vertx = vertx;
    }
    
    public Router getRouter() {
        Router router = Router.router(vertx);

        // We need cookies, sessions and request bodies
        router.route().handler(CookieHandler.create());
        router.route().handler(BodyHandler.create());
        router.route().handler(SessionHandler.create(LocalSessionStore.create(vertx)));
        
// Path: src/main/java/org/audit4j/microservice/ServerConfiguration.java
// public class ServerConfiguration extends Configuration {
// 
//     private List<Transport> transports = new ArrayList<>();
//     
//     public List<Transport> getTransports() {
//         return transports;
//     }
// 
//     public void setTransports(List<Transport> transports) {
//         this.transports = transports;
//     }
// 
//     @Override
//     public String toString() {
//         return "ServerConfiguration [transports=" + transports + "]";
//     }
// }


// Path: src/main/java/org/audit4j/microservice/web/WebRouter.java
import org.audit4j.microservice.ServerConfiguration;
import io.vertx.core.Vertx;
import io.vertx.ext.auth.AuthProvider;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.handler.BodyHandler;
import io.vertx.ext.web.handler.CookieHandler;
import io.vertx.ext.web.handler.FormLoginHandler;
import io.vertx.ext.web.handler.RedirectAuthHandler;
import io.vertx.ext.web.handler.SessionHandler;
import io.vertx.ext.web.handler.UserSessionHandler;
import io.vertx.ext.web.sstore.LocalSessionStore;

package org.audit4j.microservice.web;



public class WebRouter {

    Vertx vertx;
    
    public WebRouter(Vertx vertx) {
        this.vertx = vertx;
    }
    
    public Router getRouter() {
        Router router = Router.router(vertx);

        // We need cookies, sessions and request bodies
        router.route().handler(CookieHandler.create());
        router.route().handler(BodyHandler.create());
        router.route().handler(SessionHandler.create(LocalSessionStore.create(vertx)));
        
        AuthProvider authProvider = CustomAuth.create(vertx, new ServerConfiguration());