use of org.yamcs.security.UsernamePasswordToken in project yamcs-studio by yamcs.
the class YamcsConfiguration method getFailoverConnectionProperties.
public YamcsConnectionProperties getFailoverConnectionProperties() {
if (failoverHost != null) {
YamcsConnectionProperties yprops = new YamcsConnectionProperties(failoverHost, failoverPort, instance);
yprops.setProtocol(Protocol.http);
if (!isAnonymous()) {
yprops.setAuthenticationToken(new UsernamePasswordToken(user, password));
}
return yprops;
} else {
return null;
}
}
use of org.yamcs.security.UsernamePasswordToken in project yamcs-studio by yamcs.
the class YamcsConfiguration method getPrimaryConnectionProperties.
public YamcsConnectionProperties getPrimaryConnectionProperties() {
YamcsConnectionProperties yprops = new YamcsConnectionProperties(primaryHost, primaryPort, instance);
yprops.setProtocol(Protocol.http);
if (!isAnonymous()) {
yprops.setAuthenticationToken(new UsernamePasswordToken(user, password));
}
return yprops;
}
Aggregations