shieldapi 1.1.0__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shieldapi-1.1.0/shieldapi.egg-info → shieldapi-1.2.0}/PKG-INFO +13 -2
- {shieldapi-1.1.0 → shieldapi-1.2.0}/setup.cfg +2 -2
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/frameworks/fastapi.py +1 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/frameworks/flask.py +1 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/keycloak_utils.py +3 -3
- {shieldapi-1.1.0 → shieldapi-1.2.0/shieldapi.egg-info}/PKG-INFO +13 -2
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/requires.txt +1 -1
- {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/test_fastapi.py +1 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/test_flask.py +1 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/test_keycloak_utils.py +1 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/LICENSE +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/README.md +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/pyproject.toml +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/setup.py +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/__init__.py +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/frameworks/__init__.py +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/SOURCES.txt +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/dependency_links.txt +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/top_level.txt +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/__init__.py +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/conftest.py +0 -0
- {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/mock.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: shieldapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A package for endpoint protection of APIs using Keycloak
|
|
5
5
|
Author: sintef, Fraunhofer IWM
|
|
6
6
|
Author-email: yoav.nahshon@iwm.fraunhofer.de
|
|
@@ -9,9 +9,20 @@ Classifier: License :: OSI Approved :: BSD License
|
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
10
|
Requires-Python: >=3.6
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: python-keycloak<4.0,>=1
|
|
14
|
+
Requires-Dist: flask<3.0,>=2.2.3
|
|
15
|
+
Requires-Dist: fastapi<1.0,>=0.85.0
|
|
12
16
|
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: bumpver==2021.1114; extra == "dev"
|
|
18
|
+
Requires-Dist: dunamai==1.7.0; extra == "dev"
|
|
19
|
+
Requires-Dist: pre-commit~=2.20.0; extra == "dev"
|
|
13
20
|
Provides-Extra: tests
|
|
14
|
-
|
|
21
|
+
Requires-Dist: pytest<8.0,>=7.1.3; extra == "tests"
|
|
22
|
+
Requires-Dist: requests-mock<2.0,>=1.10.0; extra == "tests"
|
|
23
|
+
Requires-Dist: httpx<1.0,>=0.23.3; extra == "tests"
|
|
24
|
+
Requires-Dist: semver<3.0,>=2.13.0; extra == "tests"
|
|
25
|
+
Requires-Dist: pytest-mock>=3.10.0; extra == "tests"
|
|
15
26
|
|
|
16
27
|
# ShieldAPI
|
|
17
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = shieldapi
|
|
3
|
-
version = v1.
|
|
3
|
+
version = v1.2.0
|
|
4
4
|
author = sintef, Fraunhofer IWM
|
|
5
5
|
author_email = yoav.nahshon@iwm.fraunhofer.de
|
|
6
6
|
description = A package for endpoint protection of APIs using Keycloak
|
|
@@ -15,7 +15,7 @@ classifiers =
|
|
|
15
15
|
packages = find:
|
|
16
16
|
python_requires = >=3.6
|
|
17
17
|
install_requires =
|
|
18
|
-
python-keycloak
|
|
18
|
+
python-keycloak >= 1,<4.0
|
|
19
19
|
flask >= 2.2.3,<3.0
|
|
20
20
|
fastapi>=0.85.0,<1.0
|
|
21
21
|
|
|
@@ -46,7 +46,7 @@ def get_keycloak_openid(
|
|
|
46
46
|
realm_name=_get_value(realm_name, "KEYCLOAK_REALM_NAME"),
|
|
47
47
|
client_id=_get_value(client_id, "KEYCLOAK_CLIENT_ID", "shieldapi"),
|
|
48
48
|
client_secret_key=_get_value(client_secret, "KEYCLOAK_CLIENT_SECRET"),
|
|
49
|
-
verify=_get_value(verify, "KEYCLOAK_VERIFY_HOST",
|
|
49
|
+
verify=_get_value(verify, "KEYCLOAK_VERIFY_HOST", False, True),
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
|
|
@@ -88,7 +88,7 @@ def get_keycloak_admin(
|
|
|
88
88
|
username=_get_value(username, "KEYCLOAK_REALM_ADMIN_USER"),
|
|
89
89
|
password=_get_value(password, "KEYCLOAK_REALM_ADMIN_PASSWORD"),
|
|
90
90
|
realm_name=_get_value(realm_name, "KEYCLOAK_REALM_NAME"),
|
|
91
|
-
verify=_get_value(verify, "KEYCLOAK_VERIFY_HOST",
|
|
91
|
+
verify=_get_value(verify, "KEYCLOAK_VERIFY_HOST", False, True),
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
|
|
@@ -215,7 +215,7 @@ def _check_active_token(token_info) -> bool:
|
|
|
215
215
|
Returns:
|
|
216
216
|
bool: Whether the token is valid
|
|
217
217
|
"""
|
|
218
|
-
return bool(token_info
|
|
218
|
+
return bool(token_info["active"])
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
def check_useraccount_access(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: shieldapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A package for endpoint protection of APIs using Keycloak
|
|
5
5
|
Author: sintef, Fraunhofer IWM
|
|
6
6
|
Author-email: yoav.nahshon@iwm.fraunhofer.de
|
|
@@ -9,9 +9,20 @@ Classifier: License :: OSI Approved :: BSD License
|
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
10
|
Requires-Python: >=3.6
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: python-keycloak<4.0,>=1
|
|
14
|
+
Requires-Dist: flask<3.0,>=2.2.3
|
|
15
|
+
Requires-Dist: fastapi<1.0,>=0.85.0
|
|
12
16
|
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: bumpver==2021.1114; extra == "dev"
|
|
18
|
+
Requires-Dist: dunamai==1.7.0; extra == "dev"
|
|
19
|
+
Requires-Dist: pre-commit~=2.20.0; extra == "dev"
|
|
13
20
|
Provides-Extra: tests
|
|
14
|
-
|
|
21
|
+
Requires-Dist: pytest<8.0,>=7.1.3; extra == "tests"
|
|
22
|
+
Requires-Dist: requests-mock<2.0,>=1.10.0; extra == "tests"
|
|
23
|
+
Requires-Dist: httpx<1.0,>=0.23.3; extra == "tests"
|
|
24
|
+
Requires-Dist: semver<3.0,>=2.13.0; extra == "tests"
|
|
25
|
+
Requires-Dist: pytest-mock>=3.10.0; extra == "tests"
|
|
15
26
|
|
|
16
27
|
# ShieldAPI
|
|
17
28
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|