Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Spring Security XJSONDataSource

    I have followed this thread:

    http://forums.smartclient.com/showthread.php?t=9633

    To get Spring Security setup to respond to requests in which the Authentication has failed with the loginRequired marker. I have confirmed that in these cases fetch DS requests are in fact responding with that marker. However, I am using the XJSONDataSource methods and these do not seem to trigger RPCManager.setLoginRequiredCallback. Is there something special I need to do in order for this to work with XJSON type calls?

    #2
    This approach can't work with XJSON because there is no opportunity for the framework (any framework) to see the raw text of the HTTP response. A response must be valid JavaScript for the framework to receive it at all.

    Do you really need to be using XJSON? Most of the time we see people using it, there's some kind of misconception that's let them to do so.

    Comment


      #3
      So is there any way to respond to a XJSONDataSource such that it will fire the RPCManager.loginRequiredCallback()?

      This is in an existing SmartGWT application that makes use of XJSONDataSource to make calls to external server.

      Comment


        #4
        There's an undocumented, unsupported API you could use to handle this - see this thread, and note, as we recommended in that thread, we highly recommend you sponsor the work to have this as a feature rather than risk your application breaking in a future release.

        Other than this sponsorship or hack, you would need to just handle the login failure response as a normal response, picking it up in DataSource.transformResponse and implementing your own means of relogin.

        Comment

        Working...
        X