I have a e4 application project which consists of following projects
app
app.feature
app.product
app.releng
then 2 plugin projects
app.service
app.ui
I have created a simple login dialog page on a handler, I inject the service on this Dialog and then it successfully authenticates on the server.
@Creatable
public class AuthenticationService {
@Inject
public AuthenticationService() {
}
private Token token;
public Token getToken() {
return token;
}
private void setToken(Token token) {
this.token = token;
}
public Token authenticate(String username, String password) {
//authenticate and set token here
}
}
The issue is that when I inject the same authentication service on a Part class, the retrieved token is null. i need it on a Part class since i will call another REST service to have a list of items to be displayed.
the Dialog and Part class reside on app.ui plugin project, while the authentication service is on app.service plugin project