Java 类org.apache.catalina.startup.TesterMapRealm 实例源码

项目:tomcat7    文件:TestRealmBase.java   
private void doTestDigestDigestPasswords(String password,
        String digest, String digestedPassword) throws Exception {
    Context context = new TesterContext();
    TesterMapRealm realm = new TesterMapRealm();
    realm.setContainer(context);
    realm.setDigest(digest);
    realm.start();

    realm.addUser(USER1, digestedPassword);

    Principal p = realm.authenticate(USER1, password);

    Assert.assertNotNull(p);
    Assert.assertEquals(USER1, p.getName());
}
项目:apache-tomcat-7.0.73-with-comment    文件:TestRealmBase.java   
private void doTestDigestDigestPasswords(String password,
        String digest, String digestedPassword) throws Exception {
    Context context = new TesterContext();
    TesterMapRealm realm = new TesterMapRealm();
    realm.setContainer(context);
    realm.setDigest(digest);
    realm.start();

    realm.addUser(USER1, digestedPassword);

    Principal p = realm.authenticate(USER1, password);

    Assert.assertNotNull(p);
    Assert.assertEquals(USER1, p.getName());
}
项目:class-guard    文件:TestRealmBase.java   
private void doTestDigestDigestPasswords(String password,
        String digest, String digestedPassword) throws Exception {
    Context context = new TesterContext();
    TesterMapRealm realm = new TesterMapRealm();
    realm.setContainer(context);
    realm.setDigest(digest);
    realm.start();

    realm.addUser(USER1, digestedPassword);

    Principal p = realm.authenticate(USER1, password);

    Assert.assertNotNull(p);
    Assert.assertEquals(USER1, p.getName());
}
项目:apache-tomcat-7.0.57    文件:TestRealmBase.java   
private void doTestDigestDigestPasswords(String password,
        String digest, String digestedPassword) throws Exception {
    Context context = new TesterContext();
    TesterMapRealm realm = new TesterMapRealm();
    realm.setContainer(context);
    realm.setDigest(digest);
    realm.start();

    realm.addUser(USER1, digestedPassword);

    Principal p = realm.authenticate(USER1, password);

    Assert.assertNotNull(p);
    Assert.assertEquals(USER1, p.getName());
}
项目:apache-tomcat-7.0.57    文件:TestRealmBase.java   
private void doTestDigestDigestPasswords(String password,
        String digest, String digestedPassword) throws Exception {
    Context context = new TesterContext();
    TesterMapRealm realm = new TesterMapRealm();
    realm.setContainer(context);
    realm.setDigest(digest);
    realm.start();

    realm.addUser(USER1, digestedPassword);

    Principal p = realm.authenticate(USER1, password);

    Assert.assertNotNull(p);
    Assert.assertEquals(USER1, p.getName());
}