Announcement Announcement Module
Collapse
No announcement yet.
Retaining URL parameters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retaining URL parameters

    ok.

    lets say I have a secure url pattern

    eg. /secure/link-profile

    optionally, there can be url paramaters appended.

    eg. /secure/link-profile?firstName=Bob&secondName=Smith&membershipN umber=1234

    how can I make it so that those url params are carried over to the login page?

    eg /login?firstName=Bob&secondName=Smith&membershipNum ber=1234


    the basic premise is that we offer rewards integration with a 3rd party, who will send their users to us. They will be taken to a page to link their 3rd party account/profile with their/our website user. If however, they dont have an existing account with us, then on the login page, they will go to the signup page, and we would then like to prepopulate some of their details that the 3rd party has passed on to us.

    thanks in advance


    edit: spring security 2.0.7.RELEASE, spring framework 3.1.1.RELEASE

  • #2
    achieved this by overriding determineUrlToUseForThisRequest in my existing AuthenticationProcessingFilterEntryPoint implementation

    Code:
    @Override
    protected String determineUrlToUseForThisRequest(HttpServletRequest request, HttpServletResponse response,
            AuthenticationException exception) {
        String url = super.determineUrlToUseForThisRequest(request, response, exception);
        return url + "?" + request.getQueryString();
    }

    Comment

    Working...
    X