post-inject auth token
@@ -93,7 +93,6 @@ public class GenericExternalService extends EvergreenService {
}
});
- AuthenticationHandler.registerAuthToken(this);
}
public static String exit2String(int exitCode) {
@@ -101,6 +100,12 @@ public class GenericExternalService extends EvergreenService {
: "exit(" + ((exitCode << 24) >> 24) + ")";
}
+ @Override
+ public void postInject() {
+ super.postInject();
+ AuthenticationHandler.registerAuthToken(this);
+ }
+
/**
* Run the command under 'bootstrap' and returns the exit code. The timeout can be configured with 'timeout' field
* in seconds. If not configured, by default, it times out after 2 minutes.
