My system has this architecture:
- 'Hidden' server A (written in Java) which allow connection only from server B. There is no authentication in A. Server A have very rich API
- Server B (PHP, laravel5, MySQL) 'middleware' which have users table and which authenticate user using JWT
- File Server C with frontend angular2 app which will use rich API (indirectly from server A).
Server B only authenticates users and should pass they request to server A with very simple mapping (almost one-to-one - only request URL prefixes can changes).
The Question is, How to make such mapping (receive, authenticate JWT, 'redirect' requests to server B, and give back a response from A to web browser) with the less effort in travel? Or maybe this architecture is not good at all?
Please give me an only idea and 'keywords' (not necessarily full implementation :P ).