pytest-nhsd-apim 4.0.0__tar.gz → 4.0.1__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.
Potentially problematic release.
This version of pytest-nhsd-apim might be problematic. Click here for more details.
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/PKG-INFO +2 -2
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/pyproject.toml +2 -2
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/identity_service.py +11 -11
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/PKG-INFO +2 -2
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/requires.txt +1 -1
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/README.md +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/setup.cfg +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/setup.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/__init__.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/apigee_apis.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/apigee_edge.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/auth_journey.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/config.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/log.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/nhsd_apim_authorization.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/pytest_nhsd_apim.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/secrets.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/token_cache.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/SOURCES.txt +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/dependency_links.txt +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/entry_points.txt +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/top_level.txt +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/tests/test_apigee_apis.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/tests/test_examples.py +0 -0
- {pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/tests/test_nhsd_apim.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytest-nhsd-apim
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.1
|
|
4
4
|
Summary: Pytest plugin accessing NHSDigital's APIM proxies
|
|
5
5
|
Home-page: https://github.com/NHSDigital/pytest-nhsd-apim
|
|
6
6
|
Author: Adrian Ciobanita
|
|
@@ -18,7 +18,7 @@ Requires-Dist: pycryptodome==3.20.0
|
|
|
18
18
|
Requires-Dist: PyJWT==2.8.0
|
|
19
19
|
Requires-Dist: pyotp==2.9.0
|
|
20
20
|
Requires-Dist: pytest==8.2.0
|
|
21
|
-
Requires-Dist: requests==2.
|
|
21
|
+
Requires-Dist: requests==2.32.0
|
|
22
22
|
Requires-Dist: toml==0.10.2
|
|
23
23
|
Requires-Dist: typing-extensions==4.11.0
|
|
24
24
|
Requires-Dist: pydantic==2.9.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pytest-nhsd-apim"
|
|
3
|
-
version = "4.0.
|
|
3
|
+
version = "4.0.1"
|
|
4
4
|
description = "Pytest plugin accessing NHSDigital's APIM proxies"
|
|
5
5
|
authors = ["Adrian Ciobanita <adrian.ciobanita1@nhs.net>", "Alex Carrie <alexander.carrie1@nhs.net>", "Lucas Fantini <lucas.fantini@nhs.net>"]
|
|
6
6
|
maintainers = ["Alex Carrie <alexander.carrie1@nhs.net>", "Alex Hawdon <alex.hawdon1@nhs.net"]
|
|
@@ -18,7 +18,7 @@ pycryptodome = "^3.20.0"
|
|
|
18
18
|
PyJWT = "^2.8.0"
|
|
19
19
|
pyotp = "^2.9.0"
|
|
20
20
|
pytest = "^8.2.0"
|
|
21
|
-
requests = "^2.
|
|
21
|
+
requests = "^2.32.0"
|
|
22
22
|
toml = "^0.10.2"
|
|
23
23
|
typing-extensions = "^4.11.0"
|
|
24
24
|
pydantic = "^2.9.2"
|
|
@@ -7,18 +7,18 @@ maybe move this file to its own library.
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import uuid
|
|
10
|
-
from time import time
|
|
11
|
-
from typing import Literal
|
|
12
|
-
|
|
13
|
-
import jwt
|
|
14
|
-
from pydantic import BaseModel, HttpUrl, validator
|
|
15
10
|
from abc import ABC, abstractmethod
|
|
11
|
+
from time import time
|
|
16
12
|
from typing import Literal
|
|
17
13
|
from urllib.parse import parse_qs, urlparse
|
|
18
14
|
|
|
15
|
+
import jwt
|
|
19
16
|
import requests
|
|
20
17
|
from lxml import html
|
|
18
|
+
from pydantic import BaseModel, HttpUrl, validator, AfterValidator
|
|
19
|
+
from typing_extensions import Annotated
|
|
21
20
|
|
|
21
|
+
HttpUrlString = Annotated[HttpUrl, AfterValidator(lambda v: str(v))]
|
|
22
22
|
|
|
23
23
|
#### Config models
|
|
24
24
|
class KeycloakConfig(BaseModel):
|
|
@@ -55,7 +55,7 @@ class KeycloakConfig(BaseModel):
|
|
|
55
55
|
class KeycloakUserConfig(KeycloakConfig):
|
|
56
56
|
client_id: str
|
|
57
57
|
client_secret: str
|
|
58
|
-
redirect_uri:
|
|
58
|
+
redirect_uri: HttpUrlString = "https://example.org"
|
|
59
59
|
login_form: dict
|
|
60
60
|
|
|
61
61
|
|
|
@@ -82,8 +82,8 @@ class AuthorizationCodeConfig(BaseModel):
|
|
|
82
82
|
"prod",
|
|
83
83
|
] = "internal-dev"
|
|
84
84
|
org: Literal["nhsd-nonprod", "nhsd-prod"] = "nhsd-nonprod"
|
|
85
|
-
callback_url:
|
|
86
|
-
identity_service_base_url:
|
|
85
|
+
callback_url: HttpUrlString
|
|
86
|
+
identity_service_base_url: HttpUrlString = _identity_service_base_url(environment)
|
|
87
87
|
client_id: str
|
|
88
88
|
client_secret: str
|
|
89
89
|
scope: Literal["nhs-login", "nhs-cis2"]
|
|
@@ -124,7 +124,7 @@ class ClientCredentialsConfig(BaseModel):
|
|
|
124
124
|
client_id: str
|
|
125
125
|
jwt_private_key: str
|
|
126
126
|
jwt_kid: str
|
|
127
|
-
identity_service_base_url:
|
|
127
|
+
identity_service_base_url: HttpUrlString = _identity_service_base_url(environment)
|
|
128
128
|
|
|
129
129
|
def encode_jwt(self):
|
|
130
130
|
url = f"{self.identity_service_base_url}/token"
|
|
@@ -165,8 +165,8 @@ class NHSLoginConfig(BaseModel):
|
|
|
165
165
|
|
|
166
166
|
super().__init__(**kwargs)
|
|
167
167
|
|
|
168
|
-
callback_url:
|
|
169
|
-
nhs_login_base_url:
|
|
168
|
+
callback_url: HttpUrlString = "https://nhsd-apim-testing-int-ns.herokuapp.com/nhslogin/callback"
|
|
169
|
+
nhs_login_base_url: HttpUrlString
|
|
170
170
|
client_id: str = "APIM-1"
|
|
171
171
|
jwt_private_key: str
|
|
172
172
|
jwt_kid: str
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytest-nhsd-apim
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.1
|
|
4
4
|
Summary: Pytest plugin accessing NHSDigital's APIM proxies
|
|
5
5
|
Home-page: https://github.com/NHSDigital/pytest-nhsd-apim
|
|
6
6
|
Author: Adrian Ciobanita
|
|
@@ -18,7 +18,7 @@ Requires-Dist: pycryptodome==3.20.0
|
|
|
18
18
|
Requires-Dist: PyJWT==2.8.0
|
|
19
19
|
Requires-Dist: pyotp==2.9.0
|
|
20
20
|
Requires-Dist: pytest==8.2.0
|
|
21
|
-
Requires-Dist: requests==2.
|
|
21
|
+
Requires-Dist: requests==2.32.0
|
|
22
22
|
Requires-Dist: toml==0.10.2
|
|
23
23
|
Requires-Dist: typing-extensions==4.11.0
|
|
24
24
|
Requires-Dist: pydantic==2.9.2
|
|
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
|
{pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim/nhsd_apim_authorization.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{pytest_nhsd_apim-4.0.0 → pytest_nhsd_apim-4.0.1}/src/pytest_nhsd_apim.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|