test(ap1): reproduce issuer mismatch

This commit is contained in:
donghyeon-ka
2026-07-25 14:12:23 +09:00
parent 994bef0edd
commit 5a8bc9b145
4 changed files with 48 additions and 2 deletions
+12 -1
View File
@@ -74,6 +74,17 @@ try {
);
}
if (process.env.WRONG_ISSUER_URL) {
const response = await fetch(process.env.WRONG_ISSUER_URL, {
headers: { Authorization: `Bearer ${accessToken}` },
});
assert.equal(
response.status,
401,
"the same signed token must fail when the Resource Server expects another issuer",
);
}
await page.reload();
await page.locator('[data-authenticated="false"]').waitFor();
assert.equal(
@@ -83,7 +94,7 @@ try {
);
console.log(
"pattern1 browser verified: code+PKCE S256, audience positive 200/negative 401, Web Storage token 0, reload clears token",
"pattern1 browser verified: code+PKCE S256, audience/issuer negatives 401, Web Storage token 0, reload clears token",
);
} finally {
await browser.close();