/** * @return the password in plain text */ public String getPassword() { return Secret.toString(secretPassword); }
public String getDefaultValue() { return Secret.toString(defaultValue); }
public String resolve(String name) { return PasswordParameterValue.this.name.equals(name) ? Secret.toString(value) : null; } };
public ArgumentListBuilder addMasked(Secret s) { return add(Secret.toString(s),true); }
@Override public void buildEnvironment(Run<?,?> build, EnvVars env) { String v = Secret.toString(value); env.put(name, v); env.put(name.toUpperCase(Locale.ENGLISH),v); // backward compatibility pre 1.345 }
@Override public ParameterDefinition copyWithDefaultValue(ParameterValue defaultValue) { if (defaultValue instanceof PasswordParameterValue) { PasswordParameterValue value = (PasswordParameterValue) defaultValue; return new PasswordParameterDefinition(getName(), Secret.toString(value.getValue()), getDescription()); } else { return this; } }
/** * @return the password in plain text */ public String getPassword() { return Secret.toString(secretPassword); }
public String getSmtpAuthPassword() { if (smtpAuthPassword == null) { return null; } return Secret.toString(smtpAuthPassword); }
/** * Getter for property 'password'. * * @return Value for property 'password'. * @deprecated */ @Deprecated public String getPassword() { return password!=null ? Secret.toString(password) : null; }
/** * Sends message * @param msg {@link MimeMessage} * @throws MessagingException if any. */ public void send(HudsonMimeMessage msg) throws MessagingException { send(smtpHost, smtpAuthUsername, Secret.toString(smtpAuthPassword), smtpPort, msg); }
/** * {@inheritDoc} */ @NonNull @Override public List<String> getPrivateKeys() { String privateKeys = Secret.toString(privateKey); return StringUtils.isBlank(privateKeys) ? Collections.<String>emptyList() : Arrays.asList(StringUtils.split(privateKeys, "\f")); }
/** * Sends message * * @param msg {@link MimeMessage} * @throws MessagingException if any. */ public void send(HudsonMimeMessage msg) throws MessagingException { send(smtpHost, smtpAuthUsername, Secret.toString(smtpAuthPassword), smtpPort, msg); }
@Override public void buildEnvironment(Run<?,?> build, EnvVars env) { String v = Secret.toString(value); env.put(name, v); env.put(name.toUpperCase(Locale.ENGLISH),v); // backward compatibility pre 1.345 }
/** * @deprecated Use MesosCloud#getCredentials().getPassword() instead. * @return */ @Deprecated public String getSecret() { StandardUsernamePasswordCredentials credentials = getCredentials(); return credentials == null ? "" : Secret.toString(credentials.getPassword()); }
@Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(acc.getSmtpUsername(), Secret.toString(acc.getSmtpPassword())); } };
@Override public void buildEnvVars(AbstractBuild<?,?> build, EnvVars env) { String v = Secret.toString(value); env.put(name, v); env.put(name.toUpperCase(Locale.ENGLISH),v); // backward compatibility pre 1.345 }
/** * Computes the key that identifies this Hudson among other Hudsons that the user has a credential for. */ private String getPropertyKey() { String url = Hudson.getInstance().getRootUrl(); if (url!=null) return url; return Secret.fromString("key").toString(); }
/** * Computes the key that identifies this Hudson among other Hudsons that the * user has a credential for. */ private String getPropertyKey() { String url = Hudson.getInstance().getRootUrl(); if (url != null) { return url; } return Secret.fromString("key").toString(); }
@Override public ParameterDefinition copyWithDefaultValue(ParameterValue defaultValue) { if (defaultValue instanceof PasswordParameterValue) { PasswordParameterValue value = (PasswordParameterValue) defaultValue; return new PasswordParameterDefinition(getName(), Secret.toString(value.getValue()), getDescription()); } else { return this; } }