Announcement Announcement Module
Collapse
No announcement yet.
Newbie's question: design interface for remote access Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie's question: design interface for remote access

    This is a question that i always come with. For example, This is an interface as this:
    Code:
    public interface IFoo{
       IBar getBar(int id);
    }
    This interface is exposed as a remote Web Service-RPC function for third-party to use.
    But The Bar object is context sensitive. In other words, User A can only view Bar1 ,UserB can only view Bar2. So my question is : The service have no idea who sends the request. if the User B calls the interface with argument "1", The User B may get Bar1 easily. To avoid this problem, i have to add an identity argument in the remote interface. But it looks like so clumsy.

    How about your smart guys opinion? I would appreciate you help. thx!

  • #2
    Maybe some kind of identity object could be created as soon as the client logs in. This identity object could be bound to the thread of that client so your service could determine what to send back.. (and what not).

    Check http://acegisecurity.sourceforge.net btw for more information.

    Comment


    • #3
      thx,Alarmnummer. I'll check it

      Comment

      Working...
      X