/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.CertificateCredentialsImpl_DisplayName(); }
/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.CertificateCredentialsImpl_UploadedKeyStoreSourceDisplayName(); }
/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.UsernamePasswordCredentialsImpl_DisplayName(); }
public StandardCredentials getGitCredentials() { if (overrideCredentials) { return new UsernamePasswordCredentialsImpl(null, null, "release staging Git credentials", username, password); } return null; }
@Override public StandardCertificateCredentials toCredentials(String description) { return new CertificateCredentialsImpl(CredentialsScope.GLOBAL, null, description, Scrambler.descramble(Secret.toString(password)), new CertificateCredentialsImpl.UploadedKeyStoreSource(certificate.getEncryptedValue())); }
/** * Migrate to the new field. * * @return the deserialized object. * @throws ObjectStreamException if something didn't work. * @since 2.1.5 */ private Object readResolve() throws ObjectStreamException { if (uploadedKeystore != null && uploadedKeystoreBytes == null) { return new UploadedKeyStoreSource(SecretBytes.fromBytes(DescriptorImpl.toByteArray(uploadedKeystore))); } return this; }
/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.CertificateCredentialsImpl_FileOnMasterKeyStoreSourceDisplayName(); }
/** * Creates a new {@link Upload} for the specified {@literal <input id="..."/>} * * @param divId the id if the form input element to inject the uploaded content into. * @return the {@link Upload} */ @SuppressWarnings("unused") // invoked by stapler binding @Restricted(NoExternalUse.class) public Upload getUpload(String divId) { return new Upload(divId, null); }
/** * When serializing over a {@link Channel} ensure that we send a self-contained version. * * @return the object instance to write to the stream. */ private Object writeReplace() { if (/* XStream */Channel.current() == null || /* already safe to serialize */ keyStoreSource .isSnapshotSource()) { return this; } return CredentialsProvider.snapshot(this); }
@Nonnull public String getDescription() { String description = super.getDescription(); LOG.finest(description); return description; }
@Override public StandardUsernamePasswordCredentials getCredentials(final String collectionUri) { final StandardUsernamePasswordCredentials credentials = new UsernamePasswordCredentialsImpl( CredentialsScope.GLOBAL, null, null, this.userName, this.password.getPlainText() ); return credentials; }
/** * Migrate to the new field. * * @return the deserialized object. * @throws ObjectStreamException if something didn't work. * @since 2.1.5 */ private Object readResolve() throws ObjectStreamException { if (uploadedKeystore != null && uploadedKeystoreBytes == null) { return new UploadedKeyStoreSource(SecretBytes.fromBytes(DescriptorImpl.toByteArray(uploadedKeystore))); } return this; }
/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.CertificateCredentialsImpl_DisplayName(); }
/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.CertificateCredentialsImpl_UploadedKeyStoreSourceDisplayName(); }
/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.UsernamePasswordCredentialsImpl_DisplayName(); }
/** * {@inheritDoc} */ @Override public String getDisplayName() { return Messages.CertificateCredentialsImpl_FileOnMasterKeyStoreSourceDisplayName(); }
/** * Creates a new {@link Upload} for the specified {@literal <input id="..."/>} * * @param divId the id if the form input element to inject the uploaded content into. * @return the {@link Upload} */ @SuppressWarnings("unused") // invoked by stapler binding @Restricted(NoExternalUse.class) public Upload getUpload(String divId) { return new Upload(divId, null); }
/** * When serializing over a {@link Channel} ensure that we send a self-contained version. * * @return the object instance to write to the stream. */ private Object writeReplace() { if (/* XStream */Channel.current() == null || /* already safe to serialize */ keyStoreSource .isSnapshotSource()) { return this; } return CredentialsProvider.snapshot(this); }
@Override public StandardCredentials toCredentials(String description) { return new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, null, description, userName, getPassword()); }
public static String createCredentials(String serverAPIUrl, String username, String password) throws Exception { String description = serverAPIUrl + " GitHub auto generated Username password credentials"; UsernamePasswordCredentialsImpl credentials = new UsernamePasswordCredentialsImpl( CredentialsScope.GLOBAL, UUID.randomUUID().toString(), description, username, password); return createCredentials(serverAPIUrl, credentials); }