Improvements and bugfixes, token logins now complete.
This commit is contained in:
parent
c6e13156aa
commit
8c215819b1
@ -45,12 +45,15 @@ public class delegationServices {
|
||||
String password = (String) Lrequest.get("Password");
|
||||
int requesttype = (int) Lrequest.get("type");
|
||||
if (requesttype == 0) {
|
||||
System.out.println("Sync Request (Read)");
|
||||
//sync read request
|
||||
}
|
||||
if (requesttype == 1) {
|
||||
//sync write request
|
||||
System.out.println("Sync Request (Write)");
|
||||
}
|
||||
if (requesttype == 2) {
|
||||
System.out.println("Login Request (USR&PASS)");
|
||||
Document accountServer;
|
||||
String Password;
|
||||
String Token;
|
||||
@ -135,6 +138,7 @@ public class delegationServices {
|
||||
}
|
||||
}
|
||||
if (requesttype == 3) {
|
||||
System.out.println("Login Request (TKN)");
|
||||
Document TResolve = dCollection.find(eq("status", false)).first();
|
||||
String CTOKEN = (String) TResolve.get("Token");
|
||||
Document accountServer;
|
||||
@ -145,7 +149,7 @@ public class delegationServices {
|
||||
String UserName;
|
||||
String Email;
|
||||
try {
|
||||
accountServer = accountS.find(eq("Token", username)).first();
|
||||
accountServer = accountS.find(eq("Token", CTOKEN)).first();
|
||||
Password = (String) accountServer.get("Token");
|
||||
if (Password.equals(CTOKEN)) {
|
||||
Token = (String) accountServer.get("Token");
|
||||
@ -244,10 +248,9 @@ public class delegationServices {
|
||||
}
|
||||
public static void userAuthetication (Document doc){
|
||||
try {
|
||||
System.out.println("1");
|
||||
delegationProcesser();
|
||||
} catch (Exception exr) {
|
||||
System.out.println("Pending Authentication Completed");
|
||||
System.out.println("No Pending Authentication");
|
||||
delegationTimer.trigger();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user