By popular(ish) demand I’ve published to GitHub a sample that demonstrates using my OAuth 2 Angular plugin (also hosted on GitHub) requesting tokens from IdentityServer3 and using them to access protected Web API resources.
The sample can be found on GitHub and should be pretty easy to get running as long as you have the pre-reqs (npm, git, grunt and bower primarily):
- Open the SLN file in Visual Studio and start both projects.
- Open a NodeJS command prompt and navigate to the UI folder.
- Type “bower install” to install the plugins.
- Type “grunt serve” to run the Angular app.
The identity server is prewired with a single user account details as follows:
It should be noted that this is illustrative code, particularly in the C# projects, and it’s been written as such. I didn’t want to cloud the example with dependency injectors and other such components.
Thanks to everyone for their comments, questions, and feedback on the plugin both here and on GitHub.