Class HookSecretConfig

java.lang.Object
hudson.model.AbstractDescribableImpl<HookSecretConfig>
org.jenkinsci.plugins.github.config.HookSecretConfig
All Implemented Interfaces:
Describable<HookSecretConfig>

public class HookSecretConfig extends AbstractDescribableImpl<HookSecretConfig>
Manages storing/retrieval of the shared secret for the hook.
  • Constructor Details

    • HookSecretConfig

      @DataBoundConstructor public HookSecretConfig(String credentialsId, String signatureAlgorithm)
    • HookSecretConfig

      public HookSecretConfig(String credentialsId)
      Legacy constructor for backwards compatibility.
  • Method Details

    • getHookSecret

      @Nullable public Secret getHookSecret()
      Gets the currently used secret being used for payload verification.
      Returns:
      Current secret, null if not set.
    • getCredentialsId

      public String getCredentialsId()
    • getSignatureAlgorithm

      public SignatureAlgorithm getSignatureAlgorithm()
      Gets the signature algorithm to use for webhook validation.
      Returns:
      the configured signature algorithm, defaults to SHA-256
      Since:
      1.45.0
    • getSignatureAlgorithmName

      public String getSignatureAlgorithmName()
      Gets the signature algorithm name for UI binding.
      Returns:
      the algorithm name as string (e.g., "SHA256", "SHA1")
      Since:
      1.45.0
    • setCredentialsId

      @Deprecated public void setCredentialsId(String credentialsId)
      Parameters:
      credentialsId - a new ID