shieldapi 2.0.0rc0__tar.gz → 2.0.0rc4__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-2.0.0rc0/shieldapi.egg-info → shieldapi-2.0.0rc4}/PKG-INFO +1 -1
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/setup.cfg +1 -1
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi/frameworks/fastapi.py +1 -1
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi/keycloak_utils.py +5 -5
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4/shieldapi.egg-info}/PKG-INFO +1 -1
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/LICENSE +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/README.md +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/pyproject.toml +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/setup.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi/__init__.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi/frameworks/__init__.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi/frameworks/flask.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi.egg-info/SOURCES.txt +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi.egg-info/dependency_links.txt +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi.egg-info/requires.txt +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/shieldapi.egg-info/top_level.txt +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/tests/__init__.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/tests/conftest.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/tests/mock.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/tests/test_fastapi.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/tests/test_flask.py +0 -0
- {shieldapi-2.0.0rc0 → shieldapi-2.0.0rc4}/tests/test_keycloak_utils.py +0 -0
|
@@ -59,7 +59,7 @@ class AuthTokenBearer(HTTPBearer):
|
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
if not check_token_validity(auth.credentials):
|
|
62
|
-
logger.warning(f"AuthTokenBearer.__call__: Token validation failed
|
|
62
|
+
logger.warning(f"AuthTokenBearer.__call__: Token validation failed")
|
|
63
63
|
raise HTTPException(status_code=401, detail="Token validation failed")
|
|
64
64
|
return f"Bearer {auth.credentials}"
|
|
65
65
|
|
|
@@ -389,18 +389,18 @@ def make_auth_header(
|
|
|
389
389
|
return credentials
|
|
390
390
|
|
|
391
391
|
|
|
392
|
-
def get_userinfo() -> dict:
|
|
392
|
+
def get_userinfo(token) -> dict:
|
|
393
393
|
"""
|
|
394
394
|
Returns the user information from the access token.
|
|
395
395
|
|
|
396
|
+
Args:
|
|
397
|
+
token: str
|
|
398
|
+
The access token of the user.
|
|
399
|
+
|
|
396
400
|
Returns:
|
|
397
401
|
dict:
|
|
398
402
|
The user information.
|
|
399
403
|
"""
|
|
400
|
-
token = get_access_token()
|
|
401
|
-
if not token:
|
|
402
|
-
logger.warning("get_userinfo: No access token found")
|
|
403
|
-
return {}
|
|
404
404
|
userinfo = get_keycloak_openid().userinfo(token)
|
|
405
405
|
logger.debug(f"get_userinfo: Retrieved user info {userinfo}")
|
|
406
406
|
return userinfo
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|