class UserRepositoryAuthenticator implements Authenticator {

    @Override
    public boolean isAuthentic(Username userid, CharSequence passwd) throws MailboxException {
        try {
            return repos.test(userid, passwd.toString());
        } catch (UsersRepositoryException e) {
            throw new MailboxException("Unable to access UsersRepository", e);
        }
    }

    @Inject public  UserRepositoryAuthenticator(UsersRepository repos);

}