forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/smartgears/files/TokenGenerator*: New TokenGenerator. Differences are only cosmetic.
This commit is contained in:
parent
fd83d29809
commit
4765fea33f
Binary file not shown.
|
@ -24,7 +24,8 @@ public class TokenGenerator {
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
System.out.println("error creating file "+file.getAbsolutePath());
|
System.out.println("error creating file "+file.getAbsolutePath());
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
System.exit(10);
|
||||||
|
}
|
||||||
|
|
||||||
ContainerInfo containerInfo = new ContainerInfo(host, port);
|
ContainerInfo containerInfo = new ContainerInfo(host, port);
|
||||||
|
|
||||||
|
@ -35,8 +36,8 @@ public class TokenGenerator {
|
||||||
SecurityTokenProvider.instance.set(adminToken);
|
SecurityTokenProvider.instance.set(adminToken);
|
||||||
try {
|
try {
|
||||||
String token = proxy.requestActivation(containerInfo, args[index] );
|
String token = proxy.requestActivation(containerInfo, args[index] );
|
||||||
fw.write("<token>"+token+"</token>");
|
fw.write("<token>"+token+"</token>\n");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("error generating token for context "+args[index]);
|
System.out.println("error generating token for context "+args[index]);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally{
|
} finally{
|
||||||
|
@ -46,7 +47,8 @@ public class TokenGenerator {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println("error writing file "+file.getAbsolutePath());
|
System.out.println("error writing file "+file.getAbsolutePath());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
System.exit(10);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue