I'm still learning spring and currently I'm trying to create webapplication and RESTful API at the same server. It was easy until I tried to add OAuth2 authorizaton to be able to consume that API in Android application. I have a problem because I don't completely understand what is happening under the hood of spring.
I want achieve something like this:
- localhost:8080**/** - webapp authorized in normal way
- localhost:8080**/login** - webapp login page
- localhost:8080**/api/** -RESTfull API
- localhost:8080**/oauth/[authorize|token]** - OAuth2
- Android application to consume API
Is it even possible? Can you provide an example code or just the way I should do it?