Integrating with Python applications
Python applications that use Flask can easily enable OpenID Connect and OAuth2 to applications through the Flask-OIDC library. It can be used to protect client as well as resource server applications.
If you are looking for a library to enable OpenID Connect support for command-line interfaces, there are different OpenID Connect client implementations you can use at https://openid.net/developers/certified/.
To install Flask-OIDC, run the following command:
$ pip install Flask-OIDC
The code examples for this section are available from the following GitHub repository:
$ cd Keycloak-Identity-and-Access-Management-for-Modern-Applications/ch7/python
In the next section, we are going to start looking at how to enable a web application in order to authenticate...