Class HookSecretConfig
java.lang.Object
hudson.model.AbstractDescribableImpl<HookSecretConfig>
org.jenkinsci.plugins.github.config.HookSecretConfig
- All Implemented Interfaces:
Describable<HookSecretConfig>
Manages storing/retrieval of the shared secret for the hook.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHookSecretConfig
(String credentialsId) Legacy constructor for backwards compatibility.HookSecretConfig
(String credentialsId, String signatureAlgorithm) -
Method Summary
Modifier and TypeMethodDescriptionGets the currently used secret being used for payload verification.Gets the signature algorithm to use for webhook validation.Gets the signature algorithm name for UI binding.void
setCredentialsId
(String credentialsId) Deprecated.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
HookSecretConfig
-
HookSecretConfig
Legacy constructor for backwards compatibility.
-
-
Method Details
-
getHookSecret
Gets the currently used secret being used for payload verification.- Returns:
- Current secret, null if not set.
-
getCredentialsId
-
getSignatureAlgorithm
Gets the signature algorithm to use for webhook validation.- Returns:
- the configured signature algorithm, defaults to SHA-256
- Since:
- 1.45.0
-
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.rather treat this field as final and useGitHubPluginConfig.setHookSecretConfigs(java.util.List<org.jenkinsci.plugins.github.config.HookSecretConfig>)
- Parameters:
credentialsId
- a new ID
-
GitHubPluginConfig.setHookSecretConfigs(java.util.List<org.jenkinsci.plugins.github.config.HookSecretConfig>)