@Override
  public void authenticate(
      final JsonObject authInfo,
      final Handler<AsyncResult<User>> resultHandler
  ) {
    final String username = authInfo.getString("username");
    if (username == null) {
      resultHandler.handle(Future.failedFuture("authInfo missing 'username' field"));
      return;
    }

    final String password = authInfo.getString("password");
    if (password == null) {
      resultHandler.handle(Future.failedFuture("authInfo missing 'password' field"));
      return;
    }

    server.getWorkerExecutor().executeBlocking(
        promisedUser -> getUser(contextName, username, password, promisedUser),
        false,
        resultHandler
    );
  }
@Test
  public void shouldAuthenticateWithNonWildcardRole() throws Exception {
    // Given:
    givenAllowedRoles("user");
    givenUserRoles("user");

    // When:
    authProvider.authenticate(authInfo, userHandler);

    // Then:
    verifyAuthorizedSuccessfulLogin();
  }