Results 1 to 3 of 3

Thread: Dynamic callback url

  1. #1

    Default Dynamic callback url

    Hi
    When user is signing in from main page, then after successful authentication, he is redirected to that main page, but when he is signing in from different page (lets say from /playerconnection), then after oauth dance I'd like to redirect him to that particular page.

    My first thought was to pass some special value in state parameter and interpret it in SignInAdapter, but this parameter is not being sent.

    Later on I wanted to dynamically generate callbackUrl, but I'm not sure, whether this will not force me to define several callbacks for each provider.

    Any ideas how I should accomplish that ?

  2. #2
    Join Date
    Aug 2004
    Posts
    1,067

    Default

    May I assume that you're using Spring Security as the security mechanism here? If so, then you can get it from the SavedRequest object which you can get via a RequestCache. Have a look at the SimpleSignInAdapter in Spring Social Showcase for an example: https://github.com/SpringSource/spri...InAdapter.java
    Craig Walls
    Spring Social Project Lead

  3. #3

    Default

    Yes, I'm using Spring Security, but...

    RequestCache is being used by ExceptionTranslationFilter, that catches AccessDeniedException. This happens when user is not authenticated and tries to access protected resource and it works great.
    In my case flow is a bit different (sorry for not being precise), namely user is already authenticated (so there will be no exception) and I want to create another connection between he's account in my service and he's account in some social portal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •