Adds login and token login in web branch.

This commit is contained in:
James Quinley
2022-11-24 08:35:57 -08:00
parent 486b999005
commit bdffff72bf
4 changed files with 1869 additions and 1446 deletions

View File

@ -15,7 +15,13 @@ public class secureCalls {
public static void banAction (String UUID)
{
delegationServices.banUserID(UUID);
final Runnable runnable = new Runnable() {
public void run() {
delegationServices.banUserID(UUID);
}
};
runnable.run();
}
public static void oneTimeKeyEmail (String email, String key, String user)
{
@ -35,4 +41,13 @@ public class secureCalls {
};
runnable.run();
}
public static void accountCreationComplete (String email, String user, String UUID)
{
final Runnable runnable = new Runnable() {
public void run() {
electronicMailHandler.Onboarding(email,user,UUID);
}
};
runnable.run();
}
}

View File

@ -1,28 +1,10 @@
package com.jamesquinley.DelegationServices;
import org.bson.Document;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class delegationTimer {
public static void trigger ()
{
final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
final Runnable runnable = new Runnable() {
int countdownStarter = 2;
public void run() {
countdownStarter--;
if (countdownStarter <= 0) {
countdownStarter = 2;
delegationServices.delegate();
scheduler.shutdown();
}
}
};
scheduler.scheduleAtFixedRate(runnable, 0, 1, TimeUnit.SECONDS);
}
public static void DeleteTargetRequest (int CID)
{
final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
@ -39,6 +21,22 @@ public class delegationTimer {
};
scheduler.scheduleAtFixedRate(runnable, 0, 1, TimeUnit.SECONDS);
}
public static void DeleteTargetRequestByID (Object ID)
{
final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
final Runnable runnable = new Runnable() {
int countdownStarter = 5;
public void run() {
countdownStarter--;
if (countdownStarter <= 0) {
countdownStarter = 5;
delegationServices.TargetDeleteByID(ID);
scheduler.shutdown();
}
}
};
scheduler.scheduleAtFixedRate(runnable, 0, 1, TimeUnit.SECONDS);
}
public static void DeleteTargetRequestQuick (int CID)
{
final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);

View File

@ -13,7 +13,7 @@ public class Main
com.jamesquinley.DelegationServices.delegationServices.connectionInit(status.betaServer);
com.jamesquinley.DelegationServices.delegationServices.Purge();
System.out.println( "We're starting the login delegation server, please wait one moment while we check a few things.");
com.jamesquinley.DelegationServices.delegationTimer.trigger();
com.jamesquinley.DelegationServices.delegationServices.userAuthetication();
System.out.println("We've started everything, requests are now being served");
}
}