-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,6 +242,13 @@ def test_auth_with_another_authorized_client(self): | |
access_token = self._get_keycloak_access_token(client_id="bpaclient", scopes=["gx:*"]) | ||
response = self._get("users/current", headers={"Authorization": f"Bearer {access_token}"}) | ||
self._assert_status_code_is(response, 200) | ||
assert response.json()["email"] == "[email protected]" | ||
|
||
def test_auth_with_authorized_client_but_unauthorized_audience(self): | ||
_, response = self._login_via_keycloak("bpaonlyuser", KEYCLOAK_TEST_PASSWORD) | ||
access_token = self._get_keycloak_access_token(client_id="bpaclient", username="bpaonlyuser") | ||
response = self._get("users/current", headers={"Authorization": f"Bearer {access_token}"}) | ||
self._assert_status_code_is(response, 400) | ||
|
||
def test_auth_with_unauthorized_client(self): | ||
_, response = self._login_via_keycloak(KEYCLOAK_TEST_USERNAME, KEYCLOAK_TEST_PASSWORD) | ||
|