Package org.apache.wicket.security

Examples of org.apache.wicket.security.WaspSession


      private static final long serialVersionUID = 1L;

      @Override
      public void onClick()
      {
        WaspSession waspSession = ((WaspSession) getSession());
        if (waspSession.logoff(getLogoffContext()))
        {
          // homepage is not allowed anymore so we end up at the
          // loginpage
          setResponsePage(Application.get().getHomePage());
          waspSession.invalidate();
        }
        else
          error("A problem occured during the logoff process, please try again or contact support");
      }
    };
View Full Code Here


      private static final long serialVersionUID = 1L;

      @Override
      public boolean signIn(String username, String password)
      {
        WaspSession secureSession = (WaspSession) getSession();

        if (secureSession.isUserAuthenticated() && getLoggedInUser() != null)
        {
          secureSession.logoff(getLoggedInUser());
          secureSession.invalidateNow();
        }

        MyLoginContext userContext = new MyLoginContext(username, password);

        try
        {
          secureSession.login(userContext);
          setLoggedInUser(userContext);
        }
        catch (LoginException e)
        {
          log.error("Could not login " + username, e);
View Full Code Here

    authorized.put("model:bothcheck", getWaspApplication().getActionFactory().getAction(
      "access render"));
    // panels
    authorized.put(SecureComponentHelper.alias(MySecurePanel.class), getWaspApplication()
      .getActionFactory().getAction("access"));
    WaspSession session = getSecureSession();
    try
    {
      session.login(authorized);
      return true;
    }
    catch (LoginException e)
    {
      log.error(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.apache.wicket.security.WaspSession

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.