CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    114

    Question WCF Rest Security

    I am developing a Restful WCF service that will be accessed by URL. Clinet sites might be built in php,java,.net ..anything. How to implement security for this kind of situation. Common solutions found in net for WCF suggests Membership provider or Windows Permission principals. But would that cater for a Restful service which allows http requests?

  2. #2
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: WCF Rest Security

    Hi Shuvo,

    I worked with several APIs, and two of them from (large) professional companies.
    They both had a similar principle: First make a call to login and return some kind of login token, next use this token to all calls. It will look something like:
    Code:
    string token = someService.login("user", "pass");
    object someObject = someService.getObjectById(token, someId);
    someService.updateObject(token, someObject);
    Another idea would be to give each client a key (perhaps each client his own id), and this key should be passed to each call. It's the same idea as above, only you don't need to login to get a token.

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: WCF Rest Security

    Another way to do this is to use client certificates.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured