private TestEngine m_engine;
public final void testLogin()
{
MockHttpServletRequest request = m_engine.newHttpRequest();
try
{
// We can use cookies right?
assertTrue( m_engine.getAuthenticationManager().allowsCookieAssertions() );
// Test using Cookie and IP address (AnonymousLoginModule succeeds)
Cookie cookie = new Cookie( CookieAssertionLoginModule.PREFS_COOKIE_NAME, "Bullwinkle" );
request.setCookies( new Cookie[] { cookie } );
m_subject = new Subject();
CallbackHandler handler = new WebContainerCallbackHandler( m_engine, request );
LoginModule module = new CookieAssertionLoginModule();
module.initialize( m_subject, handler,
new HashMap<String, Object>(),