no more saml or duo

This commit is contained in:
Lizzy Hunt 2023-09-28 10:32:22 -06:00
parent ce1f646ab4
commit 5a7f1ac4c9
No known key found for this signature in database
GPG Key ID: E835BD4B08CCAF96
4 changed files with 2 additions and 17 deletions

View File

@ -92,7 +92,7 @@ export const current_shift = async () => {
if (`${AGGIETIME_URI}/${req_path}` != response_url) { if (`${AGGIETIME_URI}/${req_path}` != response_url) {
// IMO a very weird decision - when there is no open shift the api redirects // IMO a very weird decision - when there is no open shift the api redirects
// home instead of sending back a 404 or something actually *reasonable* :3 // home instead of sending back a 404 or something
return null; return null;
} }

View File

@ -24,8 +24,6 @@ export const SAML_SUBMIT_SELECTOR = "input[type=submit]";
export const SAML_EMAIL_SELECTOR = "input[type=email]"; export const SAML_EMAIL_SELECTOR = "input[type=email]";
export const SAML_PASSWORD_SELECTOR = "input[type=password]"; export const SAML_PASSWORD_SELECTOR = "input[type=password]";
export const DUO_TRUST_SELECTOR = "#trust-browser-button";
export const MAX_DEFAULT_RETRY_AMOUNT = 3; export const MAX_DEFAULT_RETRY_AMOUNT = 3;
export const WAIT_MS = 2000; export const WAIT_MS = 2000;
export const RETRY_EXPONENT = 1.2; export const RETRY_EXPONENT = 1.2;

View File

@ -111,7 +111,7 @@ specify another socket path with --socket_path`
const unix_server = net.createServer((client) => { const unix_server = net.createServer((client) => {
client.on("data", (data) => { client.on("data", (data) => {
// 4096 byte limitation since we don't buffer here :3 // 4096 byte limitation since we don't buffer here
let body; let body;
try { try {
body = JSON.parse(data); body = JSON.parse(data);

View File

@ -6,7 +6,6 @@ import {
AGGIETIME_DOMAIN, AGGIETIME_DOMAIN,
AGGIETIME_URI, AGGIETIME_URI,
AGGIETIME_URL_CONTAINS_SIGNIFIES_AUTH_COMPLETE, AGGIETIME_URL_CONTAINS_SIGNIFIES_AUTH_COMPLETE,
DUO_TRUST_SELECTOR,
LOGIN_PATH, LOGIN_PATH,
SAML_SIGN_IN_TITLE, SAML_SIGN_IN_TITLE,
SAML_SUBMIT_SELECTOR, SAML_SUBMIT_SELECTOR,
@ -66,18 +65,6 @@ export const login = async (a_number, password) => {
.then(() => driver.findElement(By.css(SAML_SUBMIT_SELECTOR)).click()); .then(() => driver.findElement(By.css(SAML_SUBMIT_SELECTOR)).click());
} }
console.log('Press (fake and cringe) "remember me" buttons...');
await driver
.wait(until.elementLocated(By.css(DUO_TRUST_SELECTOR)))
.then(() => driver.findElement(By.css(DUO_TRUST_SELECTOR)).click())
.then(() =>
driver.wait(until.elementLocated(By.css(SAML_SUBMIT_SELECTOR)))
)
.then(() => driver.findElement(By.css(SAML_SUBMIT_SELECTOR)).click());
console.log(
"Waiting for aggietime response (potential DUO required here)..."
);
await driver.wait( await driver.wait(
until.urlContains(AGGIETIME_URL_CONTAINS_SIGNIFIES_AUTH_COMPLETE) until.urlContains(AGGIETIME_URL_CONTAINS_SIGNIFIES_AUTH_COMPLETE)
); );