Clean up commented mirage authentication route handler. (#2879)
This commit is contained in:
1 parent
7e2f3e3df3
commit
a085d4d4f7
1 file changed
-22
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user