diff --git a/addons/api/mirage/route-handlers/auth.js b/addons/api/mirage/route-handlers/auth.js index 66df837ab..56a66dc4a 100644 --- a/addons/api/mirage/route-handlers/auth.js +++ b/addons/api/mirage/route-handlers/auth.js @@ -3,30 +3,8 @@ * SPDX-License-Identifier: BUSL-1.1 */ -// import config from '../../config/environment'; import { Response } from 'miragejs'; -// /** -// * Simulates a cookie-based response to authentication requests. Any user/pass -// * values are allowed *except* when `username` equals `error`, in which case a -// * simulated error response is returned. -// * @param {object} schema -// * @param {object} request -// * @return {Response} -// */ -// export default function authenticateHandler(schema, request) { -// const payload = JSON.parse(request.requestBody); -// if (payload.attributes.login_name === 'error') { -// return new Response(400); -// } else { -// const cookieName = config.auth.passwordCookieName; -// const cookieValue = v1(); -// const cookiePath = config.rootURL; -// document.cookie = `${cookieName}=${cookieValue};path=${cookiePath}`; -// return new Response(200); -// } -// } - // Quick and dirty counter system to simulate the polling behavior // of the API. If the OIDC flow is pending, the route returns 100. // If complete it returns 200 with the token JSON.