angularjs - Securing Web API web services, windows authentication -



angularjs - Securing Web API web services, windows authentication -

i need secure web services existing project, , wasn't sure how that. i'm trying prevent 1 user calling web service can perchance info user.

this setup: .net 4.5 - web api web services, windows authentication, ajax (angularjs) front end end. using nhibernate , sql server. know every web service write can check httpcontext current user, don't want have in every single web service method. there right (easier) way this? read bit asp.net identity , owin, way on head , in add-on supports entity framework out of box, have write custom providers or utilize nhibernate. right no i'm looking alternatives such using global.asax or , enabling session on server store , valid user info. ok do, or there easier alternative?

any advice?

thanks!

i'm assuming have web server configured windows authentication , part working.

for authorization, take @ system.web.mvc.authorizeattribute (msdn). out of box, utilize roles/ad security groups. if have custom authorization (e.g., stored in own database), i'd @ implementing iprinciple , setting thread.currentprincipal in global.asax.cs's application_postauthenticaterequest. implementation of iprinciple.isinrole check against permissions loaded database.

angularjs asp.net-web-api

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -