summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLizzy Hunt <lizzy.hunt@usu.edu>2023-09-28 10:32:22 -0600
committerLizzy Hunt <lizzy.hunt@usu.edu>2023-09-28 10:32:22 -0600
commit5a7f1ac4c9ec3044bef6dee6f7f6d7f51046526b (patch)
treea9fa0d5fe55d9d0e2cd5b4a042fdd9b973d2144a
parentce1f646ab4f9f96235899a85a6a94278ad1c4624 (diff)
downloadaggietimed-5a7f1ac4c9ec3044bef6dee6f7f6d7f51046526b.tar.gz
aggietimed-5a7f1ac4c9ec3044bef6dee6f7f6d7f51046526b.zip
no more saml or duo
-rw-r--r--src/aggietime.js2
-rw-r--r--src/constants.js2
-rw-r--r--src/main.js2
-rw-r--r--src/session.js13
4 files changed, 2 insertions, 17 deletions
diff --git a/src/aggietime.js b/src/aggietime.js
index 5c0ff72..f037fd4 100644
--- a/src/aggietime.js
+++ b/src/aggietime.js
@@ -92,7 +92,7 @@ export const current_shift = async () => {
if (`${AGGIETIME_URI}/${req_path}` != response_url) {
// 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;
}
diff --git a/src/constants.js b/src/constants.js
index 8d5b6b6..8360b52 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -24,8 +24,6 @@ export const SAML_SUBMIT_SELECTOR = "input[type=submit]";
export const SAML_EMAIL_SELECTOR = "input[type=email]";
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 WAIT_MS = 2000;
export const RETRY_EXPONENT = 1.2;
diff --git a/src/main.js b/src/main.js
index b08dd80..e1cb666 100644
--- a/src/main.js
+++ b/src/main.js
@@ -111,7 +111,7 @@ specify another socket path with --socket_path`
const unix_server = net.createServer((client) => {
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;
try {
body = JSON.parse(data);
diff --git a/src/session.js b/src/session.js
index 40eb5f9..42a8617 100644
--- a/src/session.js
+++ b/src/session.js
@@ -6,7 +6,6 @@ import {
AGGIETIME_DOMAIN,
AGGIETIME_URI,
AGGIETIME_URL_CONTAINS_SIGNIFIES_AUTH_COMPLETE,
- DUO_TRUST_SELECTOR,
LOGIN_PATH,
SAML_SIGN_IN_TITLE,
SAML_SUBMIT_SELECTOR,
@@ -66,18 +65,6 @@ export const login = async (a_number, password) => {
.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(
until.urlContains(AGGIETIME_URL_CONTAINS_SIGNIFIES_AUTH_COMPLETE)
);