Search in sources :

Example 1 with UserCredentials

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;
}
Also used : AuthenticationCredentials(org.eclipse.mylyn.commons.net.AuthenticationCredentials) TaskRepository(org.eclipse.mylyn.tasks.core.TaskRepository) UserCredentials(org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials)

Example 2 with UserCredentials

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;
}
Also used : UserCredentials(org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials)

Aggregations

UserCredentials (org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials)2 AuthenticationCredentials (org.eclipse.mylyn.commons.net.AuthenticationCredentials)1 TaskRepository (org.eclipse.mylyn.tasks.core.TaskRepository)1