Class CertificateCredentialsImpl
- java.lang.Object
-
- com.cloudbees.plugins.credentials.BaseCredentials
-
- com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
-
- com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl
-
- All Implemented Interfaces:
CertificateCredentials
,IdCredentials
,PasswordCredentials
,StandardCertificateCredentials
,StandardCredentials
,Credentials
,ExtensionPoint
,Describable<Credentials>
,Serializable
public class CertificateCredentialsImpl extends BaseStandardCredentials implements StandardCertificateCredentials
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CertificateCredentialsImpl.DescriptorImpl
Our descriptor.static class
CertificateCredentialsImpl.FileOnMasterKeyStoreSource
Deprecated.This approach has security vulnerabilities and should be migrated toCertificateCredentialsImpl.UploadedKeyStoreSource
static class
CertificateCredentialsImpl.KeyStoreSource
Represents a source of aKeyStore
.static class
CertificateCredentialsImpl.KeyStoreSourceDescriptor
The base class for allCertificateCredentialsImpl.KeyStoreSource
Descriptor
instances.static class
CertificateCredentialsImpl.UploadedKeyStoreSource
Let the user reference an uploaded file.-
Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
BaseStandardCredentials.BaseStandardCredentialsDescriptor
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
IdCredentials.Helpers
-
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCertificateCredentials
StandardCertificateCredentials.NameProvider
-
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
StandardCredentials.NameProvider
-
-
Constructor Summary
Constructors Constructor Description CertificateCredentialsImpl(CredentialsScope scope, String id, String description, String password, CertificateCredentialsImpl.KeyStoreSource keyStoreSource)
Our constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyStore
getKeyStore()
Returns theKeyStore
containing the certificate.CertificateCredentialsImpl.KeyStoreSource
getKeyStoreSource()
Returns the source of thegetKeyStore()
.Secret
getPassword()
Returns the password used to protect the certificate's private key ingetKeyStore()
.boolean
isPasswordEmpty()
Whether there is actually a password protecting the certificate's private key ingetKeyStore()
.-
Methods inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
equals, getDescription, getId, hashCode
-
Methods inherited from class com.cloudbees.plugins.credentials.BaseCredentials
getDescriptor, getScope
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.cloudbees.plugins.credentials.Credentials
forRun, getDescriptor, getScope
-
Methods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
getId
-
Methods inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
getDescription
-
-
-
-
Constructor Detail
-
CertificateCredentialsImpl
@DataBoundConstructor public CertificateCredentialsImpl(@CheckForNull CredentialsScope scope, @CheckForNull String id, @CheckForNull String description, @CheckForNull String password, @NonNull CertificateCredentialsImpl.KeyStoreSource keyStoreSource)
Our constructor.- Parameters:
scope
- the scope.id
- the id.description
- the description.password
- the password.keyStoreSource
- the source of the keystore that holds the certificate.
-
-
Method Detail
-
getKeyStore
@NonNull public KeyStore getKeyStore()
Returns theKeyStore
containing the certificate.- Specified by:
getKeyStore
in interfaceCertificateCredentials
- Returns:
- the
KeyStore
containing the certificate.
-
getPassword
@NonNull public Secret getPassword()
Returns the password used to protect the certificate's private key ingetKeyStore()
.- Specified by:
getPassword
in interfacePasswordCredentials
- Returns:
- the password used to protect the certificate's private key in
getKeyStore()
.
-
isPasswordEmpty
public boolean isPasswordEmpty()
Whether there is actually a password protecting the certificate's private key ingetKeyStore()
.- Returns:
true
if there is a password protecting the certificate's private key ingetKeyStore()
.
-
getKeyStoreSource
public CertificateCredentialsImpl.KeyStoreSource getKeyStoreSource()
Returns the source of thegetKeyStore()
.- Returns:
- the source of the
getKeyStore()
.
-
-