@Test void removeStorageCredentials() { tested.removeStorageCredentials(user, storageId); verify(keyStoreService).removeKey(any(), eq(STORAGE_ID)); verify(genericOper).writeKeystore(eq(user.getUserID()), any(), eq(STORAGE_KEYSTORE), any()); verify(keystoreCache.getStorageAccess()).remove(user.getUserID()); }
@Override public void removeStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId) { modifyAndStoreKeystore( forUser, keyStoreAccess -> keyStoreService.removeKey( keyStoreAccess, storageId.getId() ) ); }
StorageKeyStoreOperationsImpl implements StorageKeyStoreOperations { @Override public void removeStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId) { modifyAndStoreKeystore( forUser, keyStoreAccess -> keyStoreService.removeKey( keyStoreAccess, storageId.getId() ) ); } }
StorageKeyStoreOperationsImpl implements StorageKeyStoreOperations { @Override public void removeStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId) { modifyAndStoreKeystore( forUser, keyStoreAccess -> keyStoreService.removeKey( keyStoreAccess, storageId.getId() ) ); } @Inject  StorageKeyStoreOperationsImpl(GsonSerde gson, KeyStoreService keyStoreService,
                                         GenericKeystoreOperations genericOper, ProfileRetrievalService profile,
                                         BucketAccessService access, KeyStoreCache keystoreCache); }
StorageKeyStoreOperationsImpl implements StorageKeyStoreOperations { @Override public void removeStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId) { modifyAndStoreKeystore( forUser, keyStoreAccess -> keyStoreService.removeKey( keyStoreAccess, storageId.getId() ) ); } @Inject  StorageKeyStoreOperationsImpl(GsonSerde gson, KeyStoreService keyStoreService,
                                         GenericKeystoreOperations genericOper, ProfileRetrievalService profile,
                                         BucketAccessService access, KeyStoreCache keystoreCache); @Override @SneakyThrows StorageCredentials getStorageCredentials(UserIDAuth forUser, StorageIdentifier id); @Override @SneakyThrows Set<StorageIdentifier> readAliases(UserIDAuth forUser); @Override void updateReadKeyPassword(UserIDAuth forUser, ReadKeyPassword newPassword); @Override void createAndWriteKeystore(UserIDAuth forUser); @Override void addStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId, StorageCredentials credentials); @Override void removeStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId); @Override void invalidateCache(UserIDAuth forUser); }
StorageKeyStoreOperationsImpl implements StorageKeyStoreOperations { @Override public void removeStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId) { modifyAndStoreKeystore( forUser, keyStoreAccess -> keyStoreService.removeKey( keyStoreAccess, storageId.getId() ) ); } @Inject  StorageKeyStoreOperationsImpl(GsonSerde gson, KeyStoreService keyStoreService,
                                         GenericKeystoreOperations genericOper, ProfileRetrievalService profile,
                                         BucketAccessService access, KeyStoreCache keystoreCache); @Override @SneakyThrows StorageCredentials getStorageCredentials(UserIDAuth forUser, StorageIdentifier id); @Override @SneakyThrows Set<StorageIdentifier> readAliases(UserIDAuth forUser); @Override void updateReadKeyPassword(UserIDAuth forUser, ReadKeyPassword newPassword); @Override void createAndWriteKeystore(UserIDAuth forUser); @Override void addStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId, StorageCredentials credentials); @Override void removeStorageCredentials(UserIDAuth forUser, StorageIdentifier storageId); @Override void invalidateCache(UserIDAuth forUser);  }