Class WebhookCredentials

java.lang.Object
io.jenkins.plugins.interactiveinput.notify.WebhookCredentials

public final class WebhookCredentials extends Object
Secret-text credential lookup and form fill for Slack/Teams webhook URLs. The fill method always checks Item.CONFIGURE (or Jenkins.ADMINISTER when there is no item) before listing credentials — required by the credentials consumer guide and by Stapler permission scans.
  • Method Details

    • listBox

      @NonNull public static ListBoxModel listBox(@CheckForNull Item item, @CheckForNull String current)
      Populate the webhook credentials dropdown. Empty when the caller cannot configure the item.
      Parameters:
      item - the job being configured, or null on a global form
      current - the currently selected credentials id (kept visible via includeCurrentValue); null is treated as empty because includeCurrentValue is @NonNull
    • secretText

      @CheckForNull public static String secretText(@CheckForNull Item item, @CheckForNull String credentialsId)
      Resolve a Secret-text credential in the job's context. Caller must already be SYSTEM or otherwise authorised; the dispatcher wraps workers in ACL.SYSTEM2.
      Returns:
      the secret string, or null if missing