use of com.openshift.restclient.authorization.IAuthorizationContext in project jbosstools-openshift by jbosstools.
the class Connection method setToken.
public void setToken(String token) {
IAuthorizationContext context = client.getAuthorizationContext();
String old = context.getToken();
context.setToken(token);
firePropertyChange(SECURE_STORAGE_TOKEN_KEY, old, token);
this.tokenLoaded = true;
}
use of com.openshift.restclient.authorization.IAuthorizationContext in project jbosstools-openshift by jbosstools.
the class Connection method loadAuthorizationContext.
private IAuthorizationContext loadAuthorizationContext() {
IAuthorizationContext context = client.getAuthorizationContext();
synchronized (context) {
if (!passwordLoaded) {
setPassword(load(SECURE_STORAGE_PASSWORD_KEY));
setRememberPassword(context.getPassword() != null);
}
if (!tokenLoaded) {
setToken(load(SECURE_STORAGE_TOKEN_KEY));
// potential conflict with load password?
setRememberToken(context.getToken() != null);
}
}
return context;
}
Aggregations