summaryrefslogtreecommitdiffstats
path: root/dom/credentialmanagement/identity/tests/mochitest/server_idtoken_error_accounts.sjs
diff options
context:
space:
mode:
Diffstat (limited to 'dom/credentialmanagement/identity/tests/mochitest/server_idtoken_error_accounts.sjs')
-rw-r--r--dom/credentialmanagement/identity/tests/mochitest/server_idtoken_error_accounts.sjs24
1 files changed, 24 insertions, 0 deletions
diff --git a/dom/credentialmanagement/identity/tests/mochitest/server_idtoken_error_accounts.sjs b/dom/credentialmanagement/identity/tests/mochitest/server_idtoken_error_accounts.sjs
new file mode 100644
index 0000000000..9baeb51ba5
--- /dev/null
+++ b/dom/credentialmanagement/identity/tests/mochitest/server_idtoken_error_accounts.sjs
@@ -0,0 +1,24 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+function handleRequest(request, response) {
+ response.setHeader("Access-Control-Allow-Origin", "*");
+ response.setHeader("Access-Control-Allow-Credentials", "true");
+ response.setHeader("Content-Type", "application/json");
+ let content = {
+ accounts: [
+ {
+ id: "1234",
+ given_name: "John",
+ name: "John Doe",
+ email: "john_doe@idp.example",
+ picture: "https://idp.example/profile/123",
+ approved_clients: ["123", "456", "789"],
+ },
+ ],
+ };
+ let body = JSON.stringify(content);
+ response.setStatusLine(request.httpVersion, 200, "OK");
+ response.write(body);
+}