Dear all,
I have configured Keycloak for user authentication on my web application which uses a Flask server (and gunicorn for production). Accessing the web app through the browser works normally, however I have the following issue.
With the same flask server, I have set up some restful APIs that I also want to secure. These APIs are supposed to be accessed by machines, and therefore I need a way to provide credentials or a token of some sort to the APIs, when I want to access them.
I am looking for a simple solution to this problem, not necessarily the best possible practice. For example, I saw that I could provide Authorization credentials in my HTTP requests to the API, but that didn’t work; the API just returned a HTML document about redirection.
I would be extremely grateful if someone could support me with this. Thank you!