Package uk.ac.osswatch.simal.wicket.authentication

Examples of uk.ac.osswatch.simal.wicket.authentication.SimalSession


    tester.assertRenderedPage(LoginPage.class);

    String[] errors = { "Invalid username/password" };
    tester.assertErrorMessages(errors);
    SimalSession sessionData = SimalSession.get();
    assertFalse(sessionData.isAuthenticated());
  }
View Full Code Here


    formTester.submit("login");

    tester.assertRenderedPage(UserHomePage.class);

    tester.assertNoErrorMessage();
    SimalSession sessionData = SimalSession.get();
    assertTrue("User not authenticated", sessionData.isAuthenticated());

    assertEquals("username is not correct", "simal", sessionData
        .getUsername());
  }
View Full Code Here

    formTester.submit("register");

    tester.assertRenderedPage(LoginPage.class);

    tester.assertNoErrorMessage();
    SimalSession sessionData = SimalSession.get();
    assertTrue("User not authenticated", sessionData.isAuthenticated());

    assertEquals("username is not correct", username, sessionData
        .getUsername());
   
    IPersonService service = SimalRepositoryFactory.getPersonService();
    IPerson user = service.findByUsername(username);
    user.delete();
View Full Code Here

    formTester.setValue("passwordRequested", "newuser");
    formTester.setValue("passwordConfirm", "newuser");
    formTester.submit("register");

    tester.assertRenderedPage(LoginPage.class);
    SimalSession sessionData = SimalSession.get();
    assertTrue("User not authenticated", sessionData.isAuthenticated());
   
    formTester = tester.newFormTester("registrationForm");
    formTester.setValue("usernameRequested", username);
    formTester.setValue("passwordRequested", "newuser");
    formTester.setValue("passwordConfirm", "newuser");
View Full Code Here

  /**
     * @see org.apache.wicket.protocol.http.WebApplication#newSession(Request, Response)
     */
    @Override
  public Session newSession(Request request, Response response) {
         return new SimalSession(request);
    }
View Full Code Here

TOP

Related Classes of uk.ac.osswatch.simal.wicket.authentication.SimalSession

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.