Skip to content

Commit 7599ecb

Browse files
Merge pull request #11 from NHSDigital/NPA-1868-set-oath-scope-to-nhs-p9
Set oauth scope for product to P9 and skipped tests pending TBCs
2 parents 1d6f6f6 + b5abe81 commit 7599ecb

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

manifest_template.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ apigee:
7575
- identity-service-mock-{{ ENV.name }}
7676
{% endif %}
7777
scopes:
78-
- 'urn:nhsd:apim:app:level3:{{ SERVICE_NAME }}'
79-
- 'urn:nhsd:apim:user-nhs-cis2:aal3:{{ SERVICE_NAME }}'
78+
- 'urn:nhsd:apim:user-nhs-login:P9:{{ SERVICE_NAME }}'
8079
specs:
8180
- name: {{ NAME }}
8281
path: {{ SERVICE_NAME }}.json

tests/test_endpoints.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,20 @@ def test_app_level0(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
7373
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
7474
assert resp.status_code == 401 # unauthorized
7575

76-
76+
@pytest.mark.skip(reason="TBC: Are we supporting Application level 3 access to the API?")
7777
@pytest.mark.nhsd_apim_authorization({"access": "application", "level": "level3"})
7878
def test_app_level3(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
7979
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
8080
assert resp.status_code == 200
8181

82-
82+
@pytest.mark.skip(reason="Requires API key to be shared with proxy and decision on endpoint and user to use")
8383
@pytest.mark.nhsd_apim_authorization(
8484
{
85-
"access": "healthcare_worker",
86-
"level": "aal3",
87-
"login_form": {"username": "656005750104"},
85+
"access": "patient",
86+
"level": "P9",
87+
"login_form": {"username": "TBC"}
8888
}
8989
)
90-
def test_cis2_aal3(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
90+
def test_nhs_login_p9(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
9191
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
9292
assert resp.status_code == 200

0 commit comments

Comments
 (0)