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