Search in sources :

Example 1 with XMLUserDatabase

use of org.apache.wiki.auth.user.XMLUserDatabase in project jspwiki by apache.

the class CookieAssertionLoginModuleTest method setUp.

/**
 */
@Before
public void setUp() throws Exception {
    Properties props = TestEngine.getTestProperties();
    props.put(XMLUserDatabase.PROP_USERDATABASE, "target/test-classes/userdatabase.xml");
    m_engine = new TestEngine(props);
    m_db = new XMLUserDatabase();
    m_subject = new Subject();
    try {
        m_db.initialize(m_engine, props);
    } catch (NoRequiredPropertyException e) {
        System.err.println(e.getMessage());
        Assert.assertTrue(false);
    }
}
Also used : TestEngine(org.apache.wiki.TestEngine) XMLUserDatabase(org.apache.wiki.auth.user.XMLUserDatabase) Properties(java.util.Properties) NoRequiredPropertyException(org.apache.wiki.api.exceptions.NoRequiredPropertyException) Subject(javax.security.auth.Subject) Before(org.junit.Before)

Example 2 with XMLUserDatabase

use of org.apache.wiki.auth.user.XMLUserDatabase in project jspwiki by apache.

the class AnonymousLoginModuleTest method setUp.

/**
 */
@Before
public void setUp() throws Exception {
    Properties props = TestEngine.getTestProperties();
    props.put(XMLUserDatabase.PROP_USERDATABASE, "target/test-classes/userdatabase.xml");
    m_engine = new TestEngine(props);
    m_db = new XMLUserDatabase();
    m_subject = new Subject();
    try {
        m_db.initialize(m_engine, props);
    } catch (NoRequiredPropertyException e) {
        System.err.println(e.getMessage());
        Assert.assertTrue(false);
    }
}
Also used : TestEngine(org.apache.wiki.TestEngine) XMLUserDatabase(org.apache.wiki.auth.user.XMLUserDatabase) Properties(java.util.Properties) NoRequiredPropertyException(org.apache.wiki.api.exceptions.NoRequiredPropertyException) Subject(javax.security.auth.Subject) Before(org.junit.Before)

Example 3 with XMLUserDatabase

use of org.apache.wiki.auth.user.XMLUserDatabase in project jspwiki by apache.

the class UserDatabaseLoginModuleTest method setUp.

/**
 */
@Before
public void setUp() throws Exception {
    Properties props = TestEngine.getTestProperties();
    props.put(XMLUserDatabase.PROP_USERDATABASE, "target/test-classes/userdatabase.xml");
    m_engine = new TestEngine(props);
    m_db = new XMLUserDatabase();
    m_subject = new Subject();
    try {
        m_db.initialize(m_engine, props);
    } catch (NoRequiredPropertyException e) {
        System.err.println(e.getMessage());
        Assert.assertTrue(false);
    }
}
Also used : TestEngine(org.apache.wiki.TestEngine) XMLUserDatabase(org.apache.wiki.auth.user.XMLUserDatabase) Properties(java.util.Properties) NoRequiredPropertyException(org.apache.wiki.api.exceptions.NoRequiredPropertyException) Subject(javax.security.auth.Subject) Before(org.junit.Before)

Example 4 with XMLUserDatabase

use of org.apache.wiki.auth.user.XMLUserDatabase in project jspwiki by apache.

the class WebContainerLoginModuleTest method setUp.

@Before
public void setUp() throws Exception {
    Properties props = TestEngine.getTestProperties();
    props.put(XMLUserDatabase.PROP_USERDATABASE, "target/test-classes/userdatabase.xml");
    m_engine = new TestEngine(props);
    m_db = new XMLUserDatabase();
    m_subject = new Subject();
    try {
        m_db.initialize(m_engine, props);
    } catch (NoRequiredPropertyException e) {
        System.err.println(e.getMessage());
        Assert.assertTrue(false);
    }
}
Also used : TestEngine(org.apache.wiki.TestEngine) XMLUserDatabase(org.apache.wiki.auth.user.XMLUserDatabase) Properties(java.util.Properties) NoRequiredPropertyException(org.apache.wiki.api.exceptions.NoRequiredPropertyException) Subject(javax.security.auth.Subject) Before(org.junit.Before)

Aggregations

Properties (java.util.Properties)4 Subject (javax.security.auth.Subject)4 TestEngine (org.apache.wiki.TestEngine)4 NoRequiredPropertyException (org.apache.wiki.api.exceptions.NoRequiredPropertyException)4 XMLUserDatabase (org.apache.wiki.auth.user.XMLUserDatabase)4 Before (org.junit.Before)4