Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-1017

Logout does not work for show.jsp and remove.jsp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0
    • 1.0.0
    • examples
    • None

      To reproduce:
      1. login with user John and add a new user.
      2. Click on the newly added user
      3. Try to logout.
      The following exception will be diplayed:

      Caused by: java.lang.RuntimeException: User do not exist
              at org.jboss.aerogear.security.picketlink.authz.IdentityManagementImpl.get(IdentityManagementImpl.java:69) [aerogear-security-picketlink-1.0.0-13032013-SNAPSHOT.jar:1.0.0-13032013-SNAPSHOT]
              at org.jboss.aerogear.security.picketlink.authz.IdentityManagementImpl$Proxy$_$$_WeldClientProxy.get(IdentityManagementImpl$Proxy$_$$_WeldClientProxy.java) [aerogear-security-picketlink-1.0.0-13032013-SNAPSHOT.jar:1.0.0-13032013-SNAPSHOT]
              at org.jboss.aerogear.controller.demo.Admin.show(Admin.java:55) [classes:]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [classes.jar:1.6.0_35]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [classes.jar:1.6.0_35]
      

      The reason for this is when the views show.jsp or remove.jsp are displayed the path is for them are show/username or show/remove, but the logout url on these pages is relative to the current page:

      <p> <a href="logout">Logout</a></p>
      

      So this would be a request to the server with show/logout which is why we getting the error message that the user does not exist.
      Changing the above tag to the following should work:

      <p> <a href="${pageContext.request.contextPath}/logout">Logout</a></p>
      

              dbeveniu Daniel Bevenius (Inactive)
              dbeveniu Daniel Bevenius (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: