Skip to content

Commit dbc8192

Browse files
Merge pull request #13 from NHSDigital/NPA-1868-set-oath-scope-to-nhs-p9
NPA-1868 Set OAUTH Scope to NHS Login p9
2 parents 5e13fa0 + 54d8db2 commit dbc8192

File tree

4 files changed

+5
-25
lines changed

4 files changed

+5
-25
lines changed

proxies/live/apiproxy/policies/OAuthV2.VerifyAccessTokenAppLevel3OrCis2Aal3.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<OAuthV2 async="false" continueOnError="false" enabled="true" name="VerifyAccessTokenUserNhsLoginP9">
2+
<Operation>VerifyAccessToken</Operation>
3+
<Scopes>urn:nhsd:apim:user-nhs-login:P9:validated-relationships-service-api</Scopes>
4+
</OAuthV2>

proxies/live/apiproxy/targets/target.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PreFlow>
33
<Request>
44
<Step>
5-
<Name>OauthV2.VerifyAccessTokenAppLevel3OrCis2Aal3</Name>
5+
<Name>VerifyAccessTokenUserNhsLoginP9</Name>
66
</Step>
77
<Step>
88
<Name>FlowCallout.ApplyRateLimiting</Name>

tests/test_endpoints.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,3 @@ def test_wait_for_status(nhsd_apim_proxy_url, status_endpoint_auth_headers):
7272
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
75-
76-
77-
@pytest.mark.skip(reason="TBC: Are we supporting Application level 3 access to the API?")
78-
@pytest.mark.nhsd_apim_authorization({"access": "application", "level": "level3"})
79-
def test_app_level3(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
80-
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
81-
assert resp.status_code == 200
82-
83-
84-
@pytest.mark.skip(reason="Requires API key to be shared with proxy and decision on endpoint and user to use")
85-
@pytest.mark.nhsd_apim_authorization(
86-
{
87-
"access": "patient",
88-
"level": "P9",
89-
"login_form": {"username": "TBC"}
90-
}
91-
)
92-
def test_nhs_login_p9(nhsd_apim_proxy_url, nhsd_apim_auth_headers):
93-
resp = requests.get(f"{nhsd_apim_proxy_url}", headers=nhsd_apim_auth_headers)
94-
assert resp.status_code == 200

0 commit comments

Comments
 (0)