Hi there.I current have some questions (I read the docs but don't understand :D sorry)- I read about authProvider and the examples but where is the username and password check go ? I have a mongodb and an users collection with userame and hashed password, and i wanna create a user management and login system, with permissions to do different tasks.
- How can I access currently logged-in user data in session ?
- Is there a proper way to add form token to protect CRSF in Vert.x ?
AuthProvider authProvider = (jsonObject, handler) -> {
// does this mean i have to custom my own authProvider ?
};
router.route().handler(CookieHandler.create());
router.route()
.handler(BodyHandler.create()
.setUploadsDirectory(config.getString("upload.path")));
router.route().handler(SessionHandler.create(LocalSessionStore.create(vertx)));
router.route().handler(UserSessionHandler.create(authProvider));
AuthHandler redirectAuthHandler = RedirectAuthHandler.create(authProvider);
// All requests to paths starting with '/admin/' will be protected
router.route(ADMIN_PATH + "/*").handler(redirectAuthHandler);