/** * Removes the persisted credential, if there's one. */ public void remove() throws IOException, InterruptedException { if (props.remove(getPropertyKey())!=null) save(); }
@VisibleForTesting void setUsingLegacyMethod(String username) throws IOException, InterruptedException { props.setProperty(getPropertyKey(), username + USERNAME_VERIFICATION_SEPARATOR + getMacOf(username)); save(); }
props.setProperty(getPropertyKey(), propertyValue); save();
/** * Removes the persisted credential, if there's one. */ public void remove() throws IOException, InterruptedException { if (props.remove(getPropertyKey())!=null) save(); }
/** * Removes the persisted credential, if there's one. */ public void remove() throws IOException, InterruptedException { if (props.remove(getPropertyKey())!=null) save(); }
/** * Removes the persisted credential, if there's one. */ public void remove() throws IOException, InterruptedException { if (props.remove(getPropertyKey())!=null) save(); }
/** * Removes the persisted credential, if there's one. */ public void remove() throws IOException, InterruptedException { if (props.remove(getPropertyKey()) != null) { save(); } }
/** * Removes the persisted credential, if there's one. */ public void remove() throws IOException, InterruptedException { if (props.remove(getPropertyKey())!=null) save(); }
/** * Persists the specified authentication. */ public void set(Authentication a) throws IOException, InterruptedException { Hudson h = Hudson.getInstance(); // make sure that this security realm is capable of retrieving the authentication by name, // as it's not required. UserDetails u = h.getSecurityRealm().loadUserByUsername(a.getName()); props.setProperty(getPropertyKey(), Secret.fromString(u.getUsername()).getEncryptedValue()); save(); }
/** * Persists the specified authentication. */ public void set(Authentication a) throws IOException, InterruptedException { Jenkins h = Jenkins.getActiveInstance(); // make sure that this security realm is capable of retrieving the authentication by name, // as it's not required. UserDetails u = h.getSecurityRealm().loadUserByUsername(a.getName()); String username = u.getUsername(); props.setProperty(getPropertyKey(), username + ":" + MAC.mac(username)); save(); }
/** * Persists the specified authentication. */ public void set(Authentication a) throws IOException, InterruptedException { Hudson h = Hudson.getInstance(); // make sure that this security realm is capable of retrieving the authentication by name, // as it's not required. UserDetails u = h.getSecurityRealm().loadUserByUsername(a.getName()); props.setProperty(getPropertyKey(), Secret.fromString(u.getUsername()).getEncryptedValue()); save(); }
/** * Persists the specified authentication. */ public void set(Authentication a) throws IOException, InterruptedException { Hudson h = Hudson.getInstance(); // make sure that this security realm is capable of retrieving the authentication by name, // as it's not required. UserDetails u = h.getSecurityRealm().loadUserByUsername(a.getName()); props.setProperty(getPropertyKey(), Secret.fromString(u.getUsername()).getEncryptedValue()); save(); }
/** * Persists the specified authentication. */ public void set(Authentication a) throws IOException, InterruptedException { Hudson h = Hudson.getInstance(); // make sure that this security realm is capable of retrieving the authentication by name, // as it's not required. UserDetails u = h.getSecurityRealm().loadUserByUsername(a.getName()); props.setProperty(getPropertyKey(), Secret.fromString(u.getUsername()).getEncryptedValue()); save(); }