asp.net mvc - Claims-Based Authorization with Angular.JS and WIF -


we have application built asp.net mvc 5. application, we've built several url-related html helpers act this:

imagine there anchor leads url, i.e. /customer/edit/5. have helper in background ask claimsauthorizationmanager (which part of windows identity foundation api) whether current user can perform action edit on resource customer. if yes, html markup anchor tag rendered. otherwise, nothing rendered.

with these helpers, we've been able have dynamic website based on background policies define url's user can access based on specific claims.

now need push same logic angularjs based spa.

so again, goal skip rendering of url-related html if user not allowed access particular url.

i've not been able find resources on how perform kind of authorization angularjs.

is there proper way or should go custom logic? there references can read on?

angular works great in restful applications. in case, set app fetch claims json , set angular template render accordingly.

but can use mvc's helper methods on partial views , use partials templates angular application. when angular app fetches html template @ foo/bar/baz (via route or ng-include or directive template or whatever), html template come mvc partial view instead of static html file. it's little dirty, works in pinch.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -