Package org.beangle.security.auth

Examples of org.beangle.security.auth.UsernamePasswordAuthentication


      assertTrue(true);
    }
  }

  public void testGetters() {
    UsernamePasswordAuthentication token = new UsernamePasswordAuthentication("Test",
        "Password", new GrantedAuthority[] { new GrantedAuthorityBean("ROLE_ONE"),
            new GrantedAuthorityBean("ROLE_TWO") });
    assertEquals("Test", token.getPrincipal());
    assertEquals("Password", token.getCredentials());
    assertEquals("ROLE_ONE", token.getAuthorities()[0].getAuthority());
    assertEquals("ROLE_TWO", token.getAuthorities()[1].getAuthority());
  }
View Full Code Here


    int sessionNum = 100;
    int profileNum = 10;
    SessionRegistry registry = new MemSessionRegistry();
    for (int i = 0; i < sessionNum; i++) {
      String random = RandomStringUtils.randomAlphanumeric(21);
      Authentication authentication = new UsernamePasswordAuthentication(new MockPrincipal(
          random, String.valueOf(RandomUtils.nextInt(profileNum))), random);
      registry.register(random, authentication);
    }

//    ConcurrentSessionStrategy controller = new ConcurrentSessionStrategy();
View Full Code Here

TOP

Related Classes of org.beangle.security.auth.UsernamePasswordAuthentication

Copyright © 2018 www.massapicom. 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.