ChristianWeyer / myProducts-End-to-End

A modern business application with HTML5, JavaScript & .NET: sample secure master-detail application with AngularJS, ASP.NET Web API, SignalR. Uses Cordova/Phonegap and node-webkit (nw.js).
35 stars 10 forks source link

https://windows8vm/ngmd/ #1

Closed danielbsig closed 11 years ago

danielbsig commented 11 years ago

Hi,

when I open the project, the MasterDetail.Web project cannot be loaded, since it cannot find this server on the local machine. What is the best way to get around this? Is using IIS required to run this project?

Regards, Daníel

ChristianWeyer commented 11 years ago

Hi

Right, this whole project is part of a workshop presenting Html5/JavaScript-based modern apps to .Net developers. Therefore we use IIS. We use SSL all the way, thus I mapped it to a virtual DNS name which sits in my hosts file in Windows.

Thanks!

danielbsig commented 11 years ago

Thank you as well!

Maybe this should be a separate issue here on github, but I cannot figure out where the actual authentication happens. It seems to send a request to api/controller/token, but what determines where this is routed to?

Regards, Daníel

ChristianWeyer commented 11 years ago

/api/controller/token/ gets a JWT session token for basic authN as described here: http://leastprivilege.com/2012/06/19/session-token-support-for-asp-net-web-api/

Thanks, -Christian

danielbsig commented 11 years ago

OK thanks. Just to clarify: the code which handles this URL is not code you wrote? I noticed that I could log on at https://ngmd.azurewebsites.net/ using cw as user/pass, what code is actually checking the username/password combo?

ChristianWeyer commented 11 years ago

Sure, this is code I wrote. It is part of the server-side implementation: https://github.com/ChristianWeyer/ngMasterDetail/blob/master/MasterDetail.Web/App_Start/WebApiConfig.cs#L59

Cheers, -Christian

danielbsig commented 11 years ago

Ah, that clears it :-)