public DefaultCredentialsIdentityConfiguration(final Host host) { this.host = host; this.store = PasswordStoreFactory.get(); }
public S3UrlProvider(final S3Session session) { this(session, PasswordStoreFactory.get()); }
public DefaultVaultRegistry(final PasswordCallback prompt) { this(PasswordStoreFactory.get(), prompt); }
public ThirdpartyBookmarkCollection() { this.keychain = PasswordStoreFactory.get(); }
public static VaultRegistry create(final PasswordCallback callback) { return create(PasswordStoreFactory.get(), callback); }
public TerminalLoginService(final CommandLine input) { super(input.hasOption(TerminalOptionsBuilder.Params.nokeychain.name()) ? new DisabledPasswordStore() : PasswordStoreFactory.get()); this.input = input; }
@Override public void callback(final Path folder, final String region, final VaultCredentials passphrase) { background(new WorkerBackgroundAction<Path>(BrowserController.this, pool, new CreateVaultWorker(region, passphrase, PasswordStoreFactory.get(), VaultFactory.get(folder, DefaultVaultRegistry.DEFAULT_MASTERKEY_FILE_NAME, DefaultVaultRegistry.DEFAULT_PEPPER)) { @Override public void cleanup(final Path vault) { reload(workdir(), Collections.singletonList(folder), Collections.singletonList(folder)); } }) ); } });
@Override public Credentials getCredentials(final String username) { // Resolve access key id final String key = PreferencesFactory.get().getProperty(String.format("%s%s", prefix, username)); if(log.isDebugEnabled()) { log.debug(String.format("Lookup access key for user %s with %s", username, key)); } if(null == key) { log.warn(String.format("No access key found for user %s", username)); return null; } return new Credentials(key, PasswordStoreFactory.get().getPassword(bookmark.getProtocol().getScheme(), bookmark.getPort(), bookmark.getHostname(), key)); }
public static SessionPool create(final Controller controller, final Cache<Path> cache, final Host bookmark, final ProgressListener listener, final Usage... usage) { return create(cache, bookmark, PasswordStoreFactory.get(), LoginCallbackFactory.get(controller), HostKeyCallbackFactory.get(controller, bookmark.getProtocol()), listener, controller, usage); }
private <T> T connected(final Connected<T> run, final LoginCallback prompt) throws BackgroundException { new LoginConnectionService(prompt, new DisabledHostKeyCallback(), PasswordStoreFactory.get(), new DisabledProgressListener()) .check(session, PathCache.empty(), new DisabledCancelCallback()); return run.call(); }
PasswordStoreFactory.get().addPassword( bookmark.getProtocol().getScheme(), bookmark.getPort(), bookmark.getHostname(), id, key.getAccessKey().getSecretAccessKey());
private <T> T authenticated(final Authenticated<T> run, final LoginCallback prompt) throws BackgroundException { final LoginOptions options = new LoginOptions(bookmark.getProtocol()); try { final LoginService login = new KeychainLoginService(PasswordStoreFactory.get()); login.validate(bookmark, LocaleFactory.localizedString("AWS Identity and Access Management", "S3"), prompt, options); return run.call(); } catch(LoginFailureException failure) { bookmark.setCredentials(prompt.prompt(bookmark, bookmark.getCredentials().getUsername(), LocaleFactory.localizedString("Login failed", "Credentials"), failure.getMessage(), options)); return this.authenticated(run, prompt); } }
private <T> T authenticated(final Authenticated<T> run, final LoginCallback prompt) throws BackgroundException { final LoginOptions options = new LoginOptions(bookmark.getProtocol()); try { final LoginService login = new KeychainLoginService(PasswordStoreFactory.get()); login.validate(bookmark, LocaleFactory.localizedString("AWS Key Management Service", "S3"), prompt, options); return run.call(); } catch(LoginFailureException failure) { bookmark.setCredentials(prompt.prompt(bookmark, bookmark.getCredentials().getUsername(), LocaleFactory.localizedString("Login failed", "Credentials"), failure.getMessage(), options)); return this.authenticated(run, prompt); } }
try { final KeychainLoginService service = new KeychainLoginService(PasswordStoreFactory.get()); final StringAppender details = new StringAppender(); details.append(LocaleFactory.localizedString("Login failed", "Credentials"));
private <T> T authenticated(final Authenticated<T> run, final LoginCallback prompt) throws BackgroundException { final LoginOptions options = new LoginOptions(bookmark.getProtocol()) .usernamePlaceholder(LocaleFactory.localizedString("Access Key ID", "S3")) .passwordPlaceholder(LocaleFactory.localizedString("Secret Access Key", "S3")); try { final LoginService login = new KeychainLoginService(PasswordStoreFactory.get()); login.validate(bookmark, LocaleFactory.localizedString("Amazon CloudFront", "S3"), prompt, options); return run.call(); } catch(LoginFailureException failure) { bookmark.setCredentials(prompt.prompt(bookmark, bookmark.getCredentials().getUsername(), LocaleFactory.localizedString("Login failed", "Credentials"), failure.getMessage(), options)); return this.authenticated(run, prompt); } }