How to do Basic Authentication of a resource in Dropwizard
I believe I have basic authentication working but I'm not sure how to protect resources so that they can only be accessed when the user is signed in. public class SimpleAuthenticator implements Authenticator<BasicCredentials, User> { UserDAO userDao; public SimpleAuthenticator(UserDAO userDao) {this.userDao = userDao;} @Override public Optional<User> authenticate(BasicCredentials credentials) throws AuthenticationException { User user = this.userDao.getUserByName(credentials.getUsername()); if (user!=null && user.getName().equalsIgnoreCase(credentials.getUsername()) && BCrypt.checkpw