Fixed the token and added a TODO since ProcessBuilder on unix cannot handle empty strings
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5147 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -157,9 +157,10 @@ public class BureauRegistry
|
|||||||
bureau.bureauId = agent.bureauId;
|
bureau.bureauId = agent.bureauId;
|
||||||
|
|
||||||
// schedule the bureau to be kicked off
|
// schedule the bureau to be kicked off
|
||||||
|
String token = generateToken();
|
||||||
bureau.builder = new ProcessBuilder(
|
bureau.builder = new ProcessBuilder(
|
||||||
generator.createCommand(
|
generator.createCommand(
|
||||||
_serverNameAndPort, agent.bureauId, ""));
|
_serverNameAndPort, agent.bureauId, token));
|
||||||
|
|
||||||
bureau.builder.redirectErrorStream(true);
|
bureau.builder.redirectErrorStream(true);
|
||||||
|
|
||||||
@@ -415,6 +416,16 @@ public class BureauRegistry
|
|||||||
return new FoundAgent(bureau, agent, bureau.agentStates.get(agent));
|
return new FoundAgent(bureau, agent, bureau.agentStates.get(agent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a hard-to-guess token that the bureau can use to authenticate itself when it tries
|
||||||
|
* to log in.
|
||||||
|
*/
|
||||||
|
protected String generateToken ()
|
||||||
|
{
|
||||||
|
// TODO: implement
|
||||||
|
return "hard-to-guess-token";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoker unit to launch a bureau's process, then assign the result on the main thread.
|
* Invoker unit to launch a bureau's process, then assign the result on the main thread.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user