Class SecretServerCredentials

  • All Implemented Interfaces:
    com.cloudbees.plugins.credentials.common.IdCredentials, com.cloudbees.plugins.credentials.common.PasswordCredentials, com.cloudbees.plugins.credentials.common.StandardCredentials, com.cloudbees.plugins.credentials.common.StandardUsernameCredentials, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials, com.cloudbees.plugins.credentials.common.UsernameCredentials, com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials, com.cloudbees.plugins.credentials.Credentials, ExtensionPoint, Describable<com.cloudbees.plugins.credentials.Credentials>, Serializable

    public class SecretServerCredentials
    extends com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
    implements com.cloudbees.plugins.credentials.common.StandardCredentials
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SecretServerCredentials.DescriptorImpl  
      • Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials

        com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptor
      • Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials

        com.cloudbees.plugins.credentials.common.IdCredentials.Helpers
      • Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials

        com.cloudbees.plugins.credentials.common.StandardCredentials.NameProvider
      • Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials

        com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials.NameProvider
    • Constructor Summary

      Constructors 
      Constructor Description
      SecretServerCredentials​(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String description, String vaultUrl, String credentialId, String secretId, String usernameSlug, String passwordSlugName)
      Constructor to initialize the SecretServerCredentials object.
    • Constructor Detail

      • SecretServerCredentials

        @DataBoundConstructor
        public SecretServerCredentials​(com.cloudbees.plugins.credentials.CredentialsScope scope,
                                       String id,
                                       String description,
                                       String vaultUrl,
                                       String credentialId,
                                       String secretId,
                                       String usernameSlug,
                                       String passwordSlugName)
        Constructor to initialize the SecretServerCredentials object.
        Parameters:
        scope - - The scope of the credentials (GLOBAL, SYSTEM, etc.).
        id - - The unique ID for the credentials.
        description - - A description for the credentials.
        vaultUrl - - The URL of the Secret Server.
        credentialId - - The ID of the credentials stored in Jenkins.
        secretId - - The ID of the secret stored in the Secret Server.
    • Method Detail

      • getVaultUrl

        public String getVaultUrl()
      • getCredentialId

        public String getCredentialId()
      • getSecretId

        public String getSecretId()
      • getUsernameSlug

        public String getUsernameSlug()
      • getPasswordSlugName

        public String getPasswordSlugName()
      • getUsername

        public String getUsername()
        Fetches the username from the Secret Server.
        Specified by:
        getUsername in interface com.cloudbees.plugins.credentials.common.UsernameCredentials
        Overrides:
        getUsername in class com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
        Returns:
        The username fetched from the Secret Server.
      • getPassword

        public Secret getPassword()
        Fetches the password from the Secret Server.
        Specified by:
        getPassword in interface com.cloudbees.plugins.credentials.common.PasswordCredentials
        Overrides:
        getPassword in class com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
        Returns:
        The password fetched from the Secret Server, wrapped in a Secret object.