Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.AuthenticationManager.authenticate()


      // verify that each of x members belongs to this group
      String groupName = ad.getnETBIOSName() + AdConstants.BACKSLASH
          + group.sAMAccountName.toLowerCase();
      for (AdTestEntity user : group.children) {
        AuthenticationResponse response = am.authenticate(
            new SimpleAuthenticationIdentity(user.sAMAccountName));
        Set<String> groups = new HashSet<String>();
        @SuppressWarnings("unchecked") Collection<Principal> principals =
            (Collection<Principal>) response.getGroups();
        for (Principal p : principals) {
View Full Code Here


    Credentials creds = new SimpleCredentials("admin", "admin".toCharArray());
    Session session = repo.login(creds);
    AuthenticationManager authenticationManager =
        new JcrAuthenticationManager(session);

    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("jimbo","jimbo")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin1")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("joe","password")).isValid());
View Full Code Here

    AuthenticationManager authenticationManager =
        new JcrAuthenticationManager(session);

    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("jimbo","jimbo")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin1")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("joe","password")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("jimbo")).isValid());
View Full Code Here

    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("jimbo","jimbo")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin1")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("joe","password")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("jimbo")).isValid());

    // in this repository, the superuser account is open with any password
View Full Code Here

        new SimpleAuthenticationIdentity("jimbo","jimbo")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin1")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("joe","password")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("jimbo")).isValid());

    // in this repository, the superuser account is open with any password
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null,"jimbo")).isValid());
View Full Code Here

        new SimpleAuthenticationIdentity("joe","password")).isValid());
    Assert.assertFalse(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("jimbo")).isValid());

    // in this repository, the superuser account is open with any password
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null,"jimbo")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null)).isValid());

    Assert.assertTrue(authenticationManager.authenticate(
View Full Code Here

        new SimpleAuthenticationIdentity("jimbo")).isValid());

    // in this repository, the superuser account is open with any password
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null,"jimbo")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null)).isValid());

    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
View Full Code Here

    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null,"jimbo")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null)).isValid());

    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("joe","joe")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("mary","mary")).isValid());
View Full Code Here

    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity(null)).isValid());

    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("joe","joe")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("mary","mary")).isValid());
  }
View Full Code Here

    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("admin","admin")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("joe","joe")).isValid());
    Assert.assertTrue(authenticationManager.authenticate(
        new SimpleAuthenticationIdentity("mary","mary")).isValid());
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.