locked
Authenticating REST backend service in Windows 8

    Question

  • I am working on Windows Store app that consumes REST services for its functionality. REST service is protected by HTTP basic authentication. Obviously I do not want to provide a login screen and store the credentials and use it for authenticating users of REST services. What is the best way to do this? Can we use web authentication broker? or something like IE credential popup? Please suggest.
    Monday, May 13, 2013 3:51 AM

Answers

  • The Web Auth Broker is designed to work with an authentication page on the server, which is something you'll need to implement. It doesn't have to be complicated, of course, and the whole idea here is to keep the credentials on the server with only a token or such on the client. The guidance doc is basically outlining the requirements of the login page so the web auth broker can talk to it properly.
    • Marked as answer by Suresh Balla Tuesday, May 14, 2013 2:17 AM
    Monday, May 13, 2013 3:37 PM

All replies

  • Yes, you should use the Web Auth Broker for this--it's one of those things that wasn't well documented but it's certainly intended for this and not just the few OAuth providers like Twitter and Facebook. The key thing is following the web auth broker provider guidance, which you can find on http://msdn.microsoft.com/en-us/library/windows/apps/jj856911.aspx.

    Monday, May 13, 2013 4:22 AM
  • Thanks for quick reply Kraig. Will this work for authenticating rest services where there is no web login page?
    Monday, May 13, 2013 4:25 AM
  • The Web Auth Broker is designed to work with an authentication page on the server, which is something you'll need to implement. It doesn't have to be complicated, of course, and the whole idea here is to keep the credentials on the server with only a token or such on the client. The guidance doc is basically outlining the requirements of the login page so the web auth broker can talk to it properly.
    • Marked as answer by Suresh Balla Tuesday, May 14, 2013 2:17 AM
    Monday, May 13, 2013 3:37 PM