Python
About#
The Python
application utilizes Flask
for effective API management. When XSUAA
is enabled, a decorator
helper is in place to seamlessly check for authorization
and authentication
.
The project configuration may vary depending on whether XSUAA
(SAP Cloud Foundry service for authorization and authentication) is enabled or not.
If XSUAA is enabled
To ensure proper configuration of your frontend application, you will need to include a .env
file in the root
directory of the frontend project. This file should contain the necessary environment variables and configurations for VCAP_SERVICES
and VCAP_APPLICATION
.
Here is an example for the same:
Usage Instructions#
If XSUAA is enabled
To check if the user is authorized, you can use the decorator function auth()
To check if the user is authorized & has a role, you can use the decorator function auth('<role>)
To start the application simply run:
Python
Flask