Eugen Paraschiv wrote this tutorial about securing a REST API with OAuth and consume it from a simple AngularJS client. Tutorials is step-by-step with extensive code examples. It does not explain theory behind the tokens usage in details, but this can be found on Internet.
The application we’re going to build out will consist of four separate modules:
- Authorization Server
- Resource Server
- UI implicit - a front end app using the Implicit Flow
- UI password - a front end app using the Password Flow
We learned how to authorize our application using OAuth2. And as a bonus the full implementation of this tutorial can be found in the GitHub project - this is an Eclipse based project, so it should be easy to import and run as it is.
[Read More]