Announcement Announcement Module
Collapse
No announcement yet.
Where does Acegi store params of link while being logged in? Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Where does Acegi store params of link while being logged in?

    My users click a link which has some get params in it.
    The link is set under lock and key under Acegi
    So the Acegi servlet does its job, namely, intercepts the call to the page and shows the auth entry point page, which for me is "login.jsp"
    And I use form-based auth..
    When the login.jsp entry point page is shown I want to get one param out of the many params in my original link.
    I tried to get it from the request and the session objects, but was unable to...which prompts the question: where does Acegi store the stuff until login process is complete

    [Mind you, after a successful login, I am able to get a hold of the params via request.getParameter(). I want one of the params in link on the auth entry point page, which I have been unsuccessful to do thus far :evil: ]

  • #2
    Somebody help me please.

    Comment


    • #3
      Hi,

      It works by storing the target url in the session. After authentication has happened, the target url is retrieved from the session and the response is redirected to the target url.

      Have a look at net.sf.acegisecurity.intercept.web.SecurityEnforce mentFilter.sendStartAuthentication method for how the origional target url gets stored.

      Comment


      • #4
        Hmmm...answer does not help me.
        I want to get a hold of param in url while logging in...not after
        How do I do that....

        Comment


        • #5
          You should be able to retrieve the URL from the session at log in time (as its in the session) and then parse the URL as needed to retrieve any parameters you need from it.

          Are you looking for an already parsed representation of the original URL (I don't believe it exists anywhere).

          Comment


          • #6
            Ok maybe I have not been clear enough.
            User clicks on link which needs a login.
            Acegi intercepts that click and shoots me over to login page.
            In my login page(login.jsp) I want to get a param from the url that was clicked on (so that I can use that param to display an image..there are two or three places to which the login could be, so the image would tell people to which system they are logging to, is the idea behind) I am unable to do that(meaning to get stuff from url from session as people have said here)...

            Since I was unable to get the url and hence the param from session, I posted this question(what happens between intercepting and logging in)

            Comment


            • #7
              Subclass AuthenticationProcessingFilter - or the view JSP or whatever is rendering your page - and retrieve from the HttpSession the URL by looking at the attribute keyed on AbstractProcessingFilter.ACEGI_SECURITY_TARGET_URL _KEY.

              Comment

              Working...
              X