|
35 | 35 | ), |
36 | 36 | id="User role sent in header (no in id token, multiple in user info)", |
37 | 37 | ), |
| 38 | + pytest.param( |
| 39 | + {"NHSD-Session-URID": "656014452101"}, |
| 40 | + "656014452101", |
| 41 | + marks=pytest.mark.nhsd_apim_authorization( |
| 42 | + access="healthcare_worker", |
| 43 | + level="aal3", |
| 44 | + login_form={"username": "656005750104"}, |
| 45 | + authentication="separate", |
| 46 | + force_new_token=True, |
| 47 | + ), |
| 48 | + id="CIS2 separate: User role sent in header", |
| 49 | + ), |
38 | 50 | ] |
39 | 51 | UNHAPPY_PATH_PARAMS = [ |
40 | 52 | pytest.param( |
|
124 | 136 | ), |
125 | 137 | id="NHS Login combined: Can't use header to fetch from userinfo", |
126 | 138 | ), |
127 | | - pytest.param( |
128 | | - {}, |
129 | | - "selected_roleid is missing in your token", |
130 | | - 401, |
131 | | - marks=pytest.mark.nhsd_apim_authorization( |
132 | | - access="patient", |
133 | | - level="P9", |
134 | | - login_form={"username": "9912003071"}, |
135 | | - authentication="separate", |
136 | | - force_new_token=True, |
137 | | - ), |
138 | | - id="NHS Login separate: Role can't be used from token", |
139 | | - ), |
140 | | - pytest.param( |
141 | | - {"NHSD-Session-URID": "9912003071"}, |
142 | | - "unable to retrieve user info", |
143 | | - 500, |
144 | | - marks=pytest.mark.nhsd_apim_authorization( |
145 | | - access="patient", |
146 | | - level="P9", |
147 | | - login_form={"username": "9912003071"}, |
148 | | - authentication="separate", |
149 | | - force_new_token=True, |
150 | | - ), |
151 | | - id="NHS Login separate: Can't use header to fetch from userinfo", |
152 | | - ), |
153 | | - pytest.param( |
154 | | - {}, |
155 | | - "selected_roleid is missing in your token", |
156 | | - 401, |
157 | | - marks=pytest.mark.nhsd_apim_authorization( |
158 | | - access="healthcare_worker", |
159 | | - level="aal3", |
160 | | - login_form={"username": "656005750104"}, |
161 | | - authentication="separate", |
162 | | - force_new_token=True, |
163 | | - ), |
164 | | - id="CIS2 separate: Role can't be used from token", |
165 | | - ), |
166 | | - pytest.param( |
167 | | - {"NHSD-Session-URID": "656005750104"}, |
168 | | - "unable to retrieve user info", |
169 | | - 500, |
170 | | - marks=pytest.mark.nhsd_apim_authorization( |
171 | | - access="healthcare_worker", |
172 | | - level="aal3", |
173 | | - login_form={"username": "656005750104"}, |
174 | | - authentication="separate", |
175 | | - force_new_token=True, |
176 | | - ), |
177 | | - id="CIS2 separate: Can't use header to fetch from userinfo", |
178 | | - ), |
179 | 139 | ] |
180 | 140 |
|
181 | 141 |
|
|
0 commit comments