rp_python_sdk 0.11.0__tar.gz → 1.1.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.
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/PKG-INFO +6 -3
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/README.md +3 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/pyproject.toml +5 -4
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/endpoints/get_participants.py +5 -1
- rp_python_sdk-1.1.0/rp_python_sdk/endpoints/util/system_info.py +23 -0
- rp_python_sdk-1.1.0/rp_python_sdk/endpoints/util/user_agent.py +9 -0
- rp_python_sdk-1.1.0/rp_python_sdk/endpoints/util/version_info.py +2 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/__init__.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/endpoints/pushed_authorisation_request.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/endpoints/retrieve_tokens.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/endpoints/user_info.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/endpoints/util/fapi.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/endpoints/util/mapping.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/filters/participant_filters.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/model.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/relying_party_client_sdk.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/relying_party_client_sdk_exception.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/sdk_config.py +0 -0
- {rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/setup_logger.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: rp_python_sdk
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Python SDK for Relying Parties to enable simple integration with the Digital Identity ecosystem
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Erik Pragt
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
13
|
Requires-Dist: authlib (>=1.3.2,<2.0.0)
|
|
14
14
|
Requires-Dist: cffi (>=1.17.1,<2.0.0)
|
|
15
|
-
Requires-Dist: cryptography (>=
|
|
15
|
+
Requires-Dist: cryptography (>=44.0.0,<45.0.0)
|
|
16
16
|
Requires-Dist: joserfc (>=1.0.0,<2.0.0)
|
|
17
17
|
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
@@ -426,6 +426,9 @@ poetry publish
|
|
|
426
426
|
|
|
427
427
|
## Release Notes
|
|
428
428
|
|
|
429
|
+
### 1.1.0 (Mar 14, 2025)
|
|
430
|
+
- Implement user agent logging.
|
|
431
|
+
|
|
429
432
|
### 0.11.0 (Nov 29, 2024)
|
|
430
433
|
- Update to use Authorisation Server issuer attribute as `aud` value when retrieving tokens.
|
|
431
434
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "rp_python_sdk"
|
|
3
|
-
version = "
|
|
3
|
+
version = "1.1.0"
|
|
4
4
|
description = "Python SDK for Relying Parties to enable simple integration with the Digital Identity ecosystem"
|
|
5
5
|
authors = ["Erik Pragt <erik.pragt@connectid.com.au>"]
|
|
6
6
|
license = "Proprietary"
|
|
@@ -10,17 +10,18 @@ readme = "README.md"
|
|
|
10
10
|
python = "^3.12"
|
|
11
11
|
requests = "^2.32.3"
|
|
12
12
|
authlib = "^1.3.2"
|
|
13
|
-
cryptography = "^
|
|
13
|
+
cryptography = "^44.0.0"
|
|
14
14
|
joserfc = "^1.0.0"
|
|
15
15
|
cffi = "^1.17.1"
|
|
16
16
|
|
|
17
17
|
[tool.poetry.group.test.dependencies]
|
|
18
18
|
pytest = "^8.3.3"
|
|
19
|
-
httpx = "^0.
|
|
19
|
+
httpx = "^0.28.0"
|
|
20
|
+
toml = "^0.10.2"
|
|
20
21
|
|
|
21
22
|
[tool.poetry.group.dev.dependencies]
|
|
22
23
|
black = "^24.10.0"
|
|
23
|
-
pre-commit = "^
|
|
24
|
+
pre-commit = "^4.0.0"
|
|
24
25
|
mypy = "^1.13.0"
|
|
25
26
|
requests-mock = "^1.12.1"
|
|
26
27
|
freezegun = "^1.4.0"
|
|
@@ -4,6 +4,7 @@ import requests
|
|
|
4
4
|
import json
|
|
5
5
|
|
|
6
6
|
from rp_python_sdk.endpoints.util.mapping import from_dict
|
|
7
|
+
from rp_python_sdk.endpoints.util.user_agent import build_user_agent
|
|
7
8
|
from rp_python_sdk.filters.participant_filters import remove_out_of_date_certifications, \
|
|
8
9
|
remove_unofficial_certifications, filter_for_fallback_identity_service_providers, \
|
|
9
10
|
remove_participants_without_auth_servers, remove_fallback_identity_service_provider, \
|
|
@@ -62,7 +63,10 @@ def _retrieve_full_participants_list(config: SdkConfig) -> list[Participant]:
|
|
|
62
63
|
logger.info(f"Retrieving all identity providers from {config.registry_participants_uri}")
|
|
63
64
|
|
|
64
65
|
response = requests.get(config.registry_participants_uri,
|
|
65
|
-
timeout=config.custom_config.timeout_in_seconds
|
|
66
|
+
timeout=config.custom_config.timeout_in_seconds,
|
|
67
|
+
headers={
|
|
68
|
+
'User-Agent': build_user_agent(config)
|
|
69
|
+
})
|
|
66
70
|
if response.status_code != 200:
|
|
67
71
|
raise RelyingPartyClientSdkException(
|
|
68
72
|
f"Call to identity provider endpoint failed with code: {response.status_code}")
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import platform
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def get_system_info():
|
|
5
|
+
os_name = platform.system() # e.g., "Darwin", "Windows", "Linux"
|
|
6
|
+
os_version = platform.version() # e.g., "19.6.0", "10.0.19043", "5.15.0-84-generic"
|
|
7
|
+
python_version = platform.python_version() # Python version
|
|
8
|
+
|
|
9
|
+
return f"{detect_operating_system(os_name)}; {os_name} {os_version}; Python{python_version}"
|
|
10
|
+
|
|
11
|
+
def detect_operating_system(input):
|
|
12
|
+
if input is None:
|
|
13
|
+
return "Unknown"
|
|
14
|
+
|
|
15
|
+
os_name = input.lower()
|
|
16
|
+
if "darwin" in os_name:
|
|
17
|
+
return "Macintosh"
|
|
18
|
+
elif "win" in os_name:
|
|
19
|
+
return "Windows"
|
|
20
|
+
elif "linux" in os_name:
|
|
21
|
+
return "Linux"
|
|
22
|
+
else:
|
|
23
|
+
return "Other"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from rp_python_sdk.endpoints.util.system_info import get_system_info
|
|
2
|
+
from rp_python_sdk.endpoints.util.version_info import get_version_info
|
|
3
|
+
from rp_python_sdk.sdk_config import SdkConfig
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def build_user_agent(config: SdkConfig) -> str:
|
|
7
|
+
version = get_version_info()
|
|
8
|
+
platform = get_system_info()
|
|
9
|
+
return f"cid-rp-python-sdk/{version} ({platform}) +{config.client_id}"
|
|
File without changes
|
{rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/endpoints/pushed_authorisation_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rp_python_sdk-0.11.0 → rp_python_sdk-1.1.0}/rp_python_sdk/relying_party_client_sdk_exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|