use of org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials in project linuxtools by eclipse.
the class OSIORestTestFixture method repository.
public TaskRepository repository() {
if (repository != null) {
return repository;
}
repository = new TaskRepository(getConnectorKind(), getRepositoryUrl());
UserCredentials credentials = CommonTestUtil.getCredentials(PrivilegeLevel.USER);
repository.setCredentials(org.eclipse.mylyn.commons.net.AuthenticationType.REPOSITORY, new AuthenticationCredentials(credentials.getUserName(), credentials.getPassword()), true);
return repository;
}
use of org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials in project linuxtools by eclipse.
the class OSIORestRequest method getCredentials.
protected UserCredentials getCredentials() {
UserCredentials credentials = getClient().getLocation().getCredentials(AuthenticationType.REPOSITORY);
checkState(credentials != null, "Authentication requested without valid credentials");
return credentials;
}
Aggregations