Package org.sonatype.security.ldap.realms

Examples of org.sonatype.security.ldap.realms.LdapManager.authenticateUser()


    // stop the main server
    mainConnector.stop();

    // try again, this time it should hit the cache
    Assert.assertNotNull(ldapManager.authenticateUser("rwalker", "rwalker123"));

    // wait 2 sec cache should still be valid
    Thread.sleep(1000 * 2);
    Assert.assertNotNull(ldapManager.authenticateUser("rwalker", "rwalker123"));

View Full Code Here


    // try again, this time it should hit the cache
    Assert.assertNotNull(ldapManager.authenticateUser("rwalker", "rwalker123"));

    // wait 2 sec cache should still be valid
    Thread.sleep(1000 * 2);
    Assert.assertNotNull(ldapManager.authenticateUser("rwalker", "rwalker123"));

    // now wait another 2 seconds and cache should be cleared
    Thread.sleep(1000 * 2);
    // server down and cache cleared
    try {
View Full Code Here

    // now wait another 2 seconds and cache should be cleared
    Thread.sleep(1000 * 2);
    // server down and cache cleared
    try {
      ldapManager.authenticateUser("rwalker", "rwalker123");
      Assert.fail("expected NoSuchLdapUserException");
    }
    catch (AuthenticationException e) {
      // expected
    }
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.