3 Replies Latest reply on Jun 1, 2013 8:04 PM by Derk Dukker

    How to use Picketlink 2.x simple example

    Ante Maletic Newbie

      Hi,

      I really believe in open source projects and people that are investing their  free time in developing framework like this one .That is really awesome and thank you for that because it you are making my life easier.

       

      There is just little thing that would be great if you can do for me and other developers:

      Can you write simple EJB application (on JSF2 and JBOSS 7) that uses your framework (version that currently on jboss 7 picket link 2.x) and:

      1. Can perform programmatic login/logout something like:

      try {

                                         final HttpServletRequest httpServletRequest = (HttpServletRequest) FacesContext

                                                                 .getCurrentInstance().getExternalContext().getRequest();

       

                                         httpServletRequest.login(getCurrentUser().getUsername(),

                                                                 MD5.encode(getCurrentUser().getPassword()));

                                         logger.debug("User " + getCurrentUser().getUsername()

                                                                 + " logged in");

       

                                         FacesHelper.redirect(ApplicationConstants.ENTRY_PAGE);

       

                              } catch (final ServletException e) {

                                         getCurrentUser().setPassword(null);

                                         if ((databaseUser != null) && databaseUser.getLocked()) {

                                                     logger.error("Login for " + getCurrentUser().getUsername()

                                                                             + " failed - user locked");

                                                     FacesHelper.addErrorMessage(Resources

                                                                             .getMessage(Resources.Messages.UserLocked));

                                                     setCurrentUser(null);

       

      1. Write example of configuration files (which actually work )  and put screenshots (where to put them in META-INF, WEB-INF, …)

       

      I believe it is a piece of cake for you (15 to 30 minutes of your time) because you are in that technology, and me and other people that are just regular programmers,that have tasks like implementing that in our application must spend days  in debugging and reading specifications just to preform simple login and logout.