public void start(StartContext startContext) throws StartException {
String path = tmpDirValue.getValue();
File authDir = new File(path, "auth");
if (authDir.exists()) {
if (authDir.isDirectory() == false) {
throw new StartException("Unable to create tmp dir for auth tokens as file already exists.");
}
} else if (authDir.mkdirs() == false) {
throw new StartException("Unable to create auth dir.");
} else {
// As a precaution make perms user restricted for directories created (if the OS allows)
authDir.setWritable(false, false);
authDir.setWritable(true, true);
authDir.setReadable(false, false);