Now we can log-in/out and use validate authentication in the back-end server. The current endpoints that are valid are:
/api/v1/login
This one accept get and post requests for now. But in production please use the post request only. The get request will be deleted once we make sure that the post request is valid with the front end.
/api/v1/main
The user must be authenticated to access this endpoint. Accessing it without a logged in user will return a text "Access denied".
/api/v1/logout
This also require a user to be authenticated. However, after using this endpoint, the user will be logged out.
To test these endpoints, lunch the project with ./platform_build_deploy.sh then wait until you see that keycloak is working. Then you can use these endpoints in the browser to see what happens. Note that the authentication requires a session ID. So if you are using this API (Backend server endpoints) not from your browser, you will need to store these session ID cookies somewhere on your program then attach them in the next requests to stay logged in.
Now we can log-in/out and use validate authentication in the back-end server. The current endpoints that are valid are:
/api/v1/login
/api/v1/main
/api/v1/logout
To test these endpoints, lunch the project with
./platform_build_deploy.sh
then wait until you see that keycloak is working. Then you can use these endpoints in the browser to see what happens. Note that the authentication requires a session ID. So if you are using this API (Backend server endpoints) not from your browser, you will need to store these session ID cookies somewhere on your program then attach them in the next requests to stay logged in.