middleware
ies_pi_predict.api.middleware
init_oidc
init_oidc sets up the OIDC authentication (see https://www.microsoft.com/en-us/security/business/security-101/what-is-openid-connect-oidc)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Flask
|
the flask application |
required |
oidc_api_client_id
|
str
|
the oidc client id |
required |
oauth2_redirect_url
|
str
|
the oauth2 redirect url |
required |
Source code in src/ies_pi_predict/api/middleware.py
init_swagger
init_swagger(
app: Flask,
app_name: str,
oidc_swagger_client_id: str,
oidc_api_client_id: str,
oauth2_redirect_url: str,
)
init_swagger sets up the swagger file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Flask
|
the flask application |
required |
app_name
|
str
|
the name of the app |
required |
oidc_swagger_client_id
|
str
|
the oidc client id for Swagger |
required |
oidc_api_client_id
|
str
|
the oidc client id for the API |
required |
oauth2_redirect_url
|
str
|
the oauth2 redirect url |
required |