/** * Returns the {@link CredentialsDescriptor#getDisplayName()}. * * @return the {@link CredentialsDescriptor#getDisplayName()}. */ public String getKind() { return credentials.getDescriptor().getDisplayName(); }
/** * Returns the {@link CredentialsDescriptor#getDisplayName()}. * * @return the {@link CredentialsDescriptor#getDisplayName()}. */ public String getKind() { return credentials.getDescriptor().getDisplayName(); }
/** * Gets the display name of the {@link CredentialsDescriptor}. * * @return the display name of the {@link CredentialsDescriptor}. */ @Exported public String getTypeName() { return credentials.getDescriptor().getDisplayName(); }
/** * Gets the display name of the {@link CredentialsDescriptor}. * * @return the display name of the {@link CredentialsDescriptor}. */ @Exported public String getTypeName() { return credentials.getDescriptor().getDisplayName(); }
public ListBoxModel doFillCredentialTypeItems() { ListBoxModel result = new ListBoxModel(); result.add("Any", StandardCredentials.class.getName()); for (Descriptor<Credentials> d : CredentialsProvider.allCredentialsDescriptors()) { if (!(d instanceof CredentialsDescriptor)) { continue; } CredentialsDescriptor descriptor = (CredentialsDescriptor) d; if (StandardCredentials.class.isAssignableFrom(descriptor.clazz)) { result.add(descriptor.getDisplayName(), descriptor.clazz.getName()); } } return result; }
public ListBoxModel doFillCredentialTypeItems() { ListBoxModel result = new ListBoxModel(); result.add("Any", StandardCredentials.class.getName()); for (Descriptor<Credentials> d : CredentialsProvider.allCredentialsDescriptors()) { if (!(d instanceof CredentialsDescriptor)) { continue; } CredentialsDescriptor descriptor = (CredentialsDescriptor) d; if (StandardCredentials.class.isAssignableFrom(descriptor.clazz)) { result.add(descriptor.getDisplayName(), descriptor.clazz.getName()); } } return result; }
/** * Returns the list box for type selection. * * @return the list box for type selection. */ @SuppressWarnings("unused") // stapler form completion @Restricted(NoExternalUse.class) public ListBoxModel doFillTypeItems() { ListBoxModel result = new ListBoxModel(); for (CredentialsDescriptor d : ExtensionList.lookup(CredentialsDescriptor.class)) { result.add(d.getDisplayName(), d.getClass().getName()); } return result; } }
/** * Returns the list box for type selection. * * @return the list box for type selection. */ @SuppressWarnings("unused") // stapler form completion @Restricted(NoExternalUse.class) public ListBoxModel doFillTypeItems() { ListBoxModel result = new ListBoxModel(); for (CredentialsDescriptor d : ExtensionList.lookup(CredentialsDescriptor.class)) { result.add(d.getDisplayName(), d.getClass().getName()); } return result; } }
/** * Returns the list box for type selection. * * @return the list box for type selection. */ @SuppressWarnings("unused") // stapler form completion @Restricted(NoExternalUse.class) public ListBoxModel doFillTypeItems() { ListBoxModel result = new ListBoxModel(); for (CredentialsDescriptor d : ExtensionList.lookup(CredentialsDescriptor.class)) { result.add(d.getDisplayName(), d.getClass().getName()); } return result; } }
@Nonnull protected static Collection<String> toString(@Nonnull Iterable<Credentials> credentials) { List<String> result = new ArrayList<>(); for (Credentials creds : credentials) { if (creds instanceof PasswordCredentials) { PasswordCredentials passwordCredentials = (PasswordCredentials) creds; result.add(passwordCredentials.getPassword().getPlainText()); } else if (creds instanceof SSHUserPrivateKey) { SSHUserPrivateKey sshUserPrivateKey = (SSHUserPrivateKey) creds; Secret passphrase = sshUserPrivateKey.getPassphrase(); if (passphrase != null) { result.add(passphrase.getPlainText()); } // omit the private key, there } else { LOGGER.log(Level.FINE, "Skip masking of unsupported credentials type {0}: {1}", new Object[]{creds.getClass(), creds.getDescriptor().getDisplayName()}); } } return result; } }
/** * Returns the list box for type selection. * * @return the list box for type selection. */ @SuppressWarnings("unused") // stapler form completion @Restricted(NoExternalUse.class) public ListBoxModel doFillTypeItems() { ListBoxModel result = new ListBoxModel(); for (CredentialsDescriptor d : ExtensionList.lookup(CredentialsDescriptor.class)) { result.add(d.getDisplayName(), d.getClass().getName()); } return result; } }
return credentials.getDescriptor().getDisplayName(); } catch (AssertionError e) { return credentials.getClass().getSimpleName();
return credentials.getDescriptor().getDisplayName(); } catch (AssertionError e) { return credentials.getClass().getSimpleName();
/** * {@inheritDoc} */ @NonNull @Override public String getName(@NonNull StandardCertificateCredentials c) { String description = Util.fixEmptyAndTrim(c.getDescription()); String subjectDN = getSubjectDN(c.getKeyStore()); return (subjectDN == null ? c.getDescriptor().getDisplayName() : subjectDN) + (description != null ? " (" + description + ")" : ""); } }
/** * {@inheritDoc} */ @NonNull @Override public String getName(@NonNull StandardCertificateCredentials c) { String description = Util.fixEmptyAndTrim(c.getDescription()); String subjectDN = getSubjectDN(c.getKeyStore()); return (subjectDN == null ? c.getDescriptor().getDisplayName() : subjectDN) + (description != null ? " (" + description + ")" : ""); } }