3 // thie file defines the messages sent too and from the gaas client.
4 function gaasStatus_clientsend($params)
9 function gaasStatus_clientrecv($params)
15 // INIT server message
17 // AD: "AD", "user", "pass", "domain", "client def", "admin def"
18 // IN: "IN", "user", "pass"
19 function gaasInitServer_clientsend($params)
21 $msg["backend"] = $params[0];
22 $msg["user"] = $params[1];
23 $msg["pass"] = $params[2];
25 if($msg["backend"] == "AD") {
26 $msg["domain"] = $params[3];
27 $msg["clientdef"] = $params[4];
28 $msg["admindef"] = $params[5];
29 } else if($msg["backend"] == "IN") {
30 // we dont do anything
32 // invalid backend type
39 // pretty simple, it either works or doesnt, we just pass on the result
40 // im leaving this function here as an example of how you deal
41 // with data coming back from the server but prior to returning
42 // to the client. if it just returns the data back to the client
43 // you doing have to define a recving function
44 function gaasInitServer_clientrecv($params)
49 function gaasSetADLogin_clientsend($params)
51 $msg["domain"] = $params[2];
52 $msg["user"] = $params[0];
53 $msg["pass"] = $params[1];
58 function gaasSetClientGroup_clientsend($params)
60 $msg["clientgroup"] = $params[0];
64 function gaasSetAdminGroup_clientsend($params)
66 $msg["admingroup"] = $params[0];
70 function gaasProvisionUser_clientsend($params)
72 $msg["username"] = $params[0];
76 function gaasGetUsers_clientsend($params)
78 $msg["havetokens"] = false;
79 $msg["userpattern"] = "";
80 $msg["group"] = "client";
81 if(isset($params[0])) {
82 if($params[0] == "admin") {
83 $msg["group"] = "admin";
86 if(isset($params[1])) {
87 $msg["userpattern"] = $params[1];
89 if(isset($params[2])) {
90 if($params[2] == "yes") {
91 $msg["havetokens"] = true;
99 function gaasDeleteUser_clientsend($params)
101 $msg["username"] = $params[0];