3

I have two MVC 5 projects that I would like to be protected by as much built-in (e.g. Identity) authorization capabilities as possible. The first is a Web API project, serving JSON responses to an Angular app based in the second, a plain MVC project (the 'UI' project). The UI project basically just serves Angular templates, and provides some miscellaneous runtime functionality.

I want the API project to be accessible to other agents, besides just the UI project, so I would like e.g. that when an agent wants to access a resource, they are redirected to the login sub-system of the API project, which acts as an 'authentication service', but then when I have authenticated the user via the API, I want that user to be authorised to use the UI project as well.

Can I achieve this using mainly Identity and as little custom code as possible, and how would I go about this? The reason I want to write as little code as possible is not laziness, but I am aware of just how risky writing any of one's own security code is.

2
  • Does this suit your requirements? stackoverflow.com/questions/26309792/… Commented Nov 11, 2015 at 4:33
  • @BrendanGreen Very close. I'll know later what needs tweaking, thanks. Commented Nov 11, 2015 at 5:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.