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.
Files changed (22) hide show
  1. {shieldapi-1.1.0/shieldapi.egg-info → shieldapi-1.2.0}/PKG-INFO +13 -2
  2. {shieldapi-1.1.0 → shieldapi-1.2.0}/setup.cfg +2 -2
  3. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/frameworks/fastapi.py +1 -0
  4. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/frameworks/flask.py +1 -0
  5. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/keycloak_utils.py +3 -3
  6. {shieldapi-1.1.0 → shieldapi-1.2.0/shieldapi.egg-info}/PKG-INFO +13 -2
  7. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/requires.txt +1 -1
  8. {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/test_fastapi.py +1 -0
  9. {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/test_flask.py +1 -0
  10. {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/test_keycloak_utils.py +1 -0
  11. {shieldapi-1.1.0 → shieldapi-1.2.0}/LICENSE +0 -0
  12. {shieldapi-1.1.0 → shieldapi-1.2.0}/README.md +0 -0
  13. {shieldapi-1.1.0 → shieldapi-1.2.0}/pyproject.toml +0 -0
  14. {shieldapi-1.1.0 → shieldapi-1.2.0}/setup.py +0 -0
  15. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/__init__.py +0 -0
  16. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi/frameworks/__init__.py +0 -0
  17. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/SOURCES.txt +0 -0
  18. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/dependency_links.txt +0 -0
  19. {shieldapi-1.1.0 → shieldapi-1.2.0}/shieldapi.egg-info/top_level.txt +0 -0
  20. {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/__init__.py +0 -0
  21. {shieldapi-1.1.0 → shieldapi-1.2.0}/tests/conftest.py +0 -0
  22. {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.1.0
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
- License-File: LICENSE
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.1.0
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 == 1.4.0
18
+ python-keycloak >= 1,<4.0
19
19
  flask >= 2.2.3,<3.0
20
20
  fastapi>=0.85.0,<1.0
21
21
 
@@ -1,4 +1,5 @@
1
1
  """Dependencies and classes for shieldapi in FastAPI."""
2
+
2
3
  import os
3
4
 
4
5
  from fastapi import HTTPException, Request
@@ -1,4 +1,5 @@
1
1
  """functions and decorators for shieldapi in Flask."""
2
+
2
3
  from functools import wraps
3
4
  from typing import Callable, List
4
5
 
@@ -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", True, True),
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", True, True),
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.json()["active"])
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.1.0
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
- License-File: LICENSE
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,4 +1,4 @@
1
- python-keycloak==1.4.0
1
+ python-keycloak<4.0,>=1
2
2
  flask<3.0,>=2.2.3
3
3
  fastapi<1.0,>=0.85.0
4
4
 
@@ -1,4 +1,5 @@
1
1
  """Pytest fixture for testing shieldapi in fastapi """
2
+
2
3
  import re
3
4
 
4
5
  import pytest
@@ -1,4 +1,5 @@
1
1
  """Pytest fixture for testing shieldapi in flask"""
2
+
2
3
  from flask import Flask
3
4
 
4
5
  from shieldapi.frameworks.flask import login_required
@@ -1,4 +1,5 @@
1
1
  """Pytest for `keycloak_utils` of the shieldapi package."""
2
+
2
3
  import os
3
4
  import warnings
4
5
  from ast import literal_eval
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes