AuthProvider authProvider = ShiroAuthProvider.create(vertx, ShiroAuthRealmType.PROPERTIES, authConfig);
AuthService authService = ShiroAuthService.create(vertx, ShiroAuthRealmType.PROPERTIES, authConfig);
authService.start();
AuthHandler authHandler =
RedirectAuthHandler.create(authProvider, Constants.LOGIN_PAGE_URL);
authHandler.addPermission("access_app");
// Handle logout
LogoutHandler logoutHandler = new LogoutHandler(authService, vertx);
router.route("/logout").handler(logoutHandler);
// Handle the actual login by handling the form post action
router.route("/login/*").handler(BodyHandler.create());
LoginHandler loginHandler =
new LoginHandler(authProvider, FormLoginHandler.DEFAULT_RETURN_URL_PARAM, vertx);
router.route("/login/:returnUrlPath").handler(loginHandler);
The interface AuthService currently has methods for login and logout but AuthProvider has only a method for login.
Does it makes sense to use one interface or the other (XOR), or are they supposed to be used at the same time?
I am using the RedirectAuthHandler which requires the AuthProvider directly now. Before that I have implemented my own logout handler which required an AuthService. So I am a bit confused if I really need both interfaces in parallel and if it breaks the single responsibility principle somehow.
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
LocalSessionStoreImpl and AuthServiceImpl seem to be very similar. My current hope is that I will not need the AuthService when I am handling sessions with the LocalSessionStore.