use of org.eclipse.userstorage.spi.ICredentialsProvider in project epp.mpc by eclipse.
the class MarketplaceStorageService method getStorageCredentials.
private Credentials getStorageCredentials() {
ICredentialsProvider provider = getStorage().getCredentialsProvider();
if (provider == null) {
return null;
}
IStorageService service = getStorage().getService();
return provider.hasCredentials(service) ? provider.getCredentials(service) : null;
}
use of org.eclipse.userstorage.spi.ICredentialsProvider in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method applyShellProvider.
protected void applyShellProvider() {
IUserFavoritesService userFavoritesService = marketplaceService.getUserFavoritesService();
if (userFavoritesService == null) {
return;
}
IMarketplaceStorageService storageService = userFavoritesService.getStorageService();
if (storageService == null) {
return;
}
IStorage storage = storageService.getStorage();
ICredentialsProvider credentialsProvider = storage.getCredentialsProvider();
if (credentialsProvider instanceof EclipseOAuthCredentialsProvider) {
((EclipseOAuthCredentialsProvider) credentialsProvider).setShell(shellProvider);
}
}
Aggregations