Adds login and token login in web branch.
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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);
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user