Package hudson.cli

Class CLIConnectionFactory

java.lang.Object
hudson.cli.CLIConnectionFactory

public class CLIConnectionFactory extends Object
Fluent-API to instantiate CLI.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • CLIConnectionFactory

      public CLIConnectionFactory()
  • Method Details

    • authorization

      public CLIConnectionFactory authorization(String value)
      For CLI connection that goes through HTTP, sometimes you need to pass in the custom authentication header (before Jenkins even get to authenticate the CLI channel.) This method lets you specify the value of this header.
    • noCertificateCheck

      public CLIConnectionFactory noCertificateCheck(boolean value)
      Skip TLS certificate and hostname verification checks.
      Since:
      2.444
    • basicAuth

      public CLIConnectionFactory basicAuth(String username, String password)
      Convenience method to call authorization with the HTTP basic authentication. Currently unused.
    • basicAuth

      public CLIConnectionFactory basicAuth(String userInfo)
      Convenience method to call authorization with the HTTP basic authentication. Cf. BasicHeaderApiTokenAuthenticator.
    • bearerAuth

      public CLIConnectionFactory bearerAuth(String bearerToken)
      Convenience method to call authorization with the HTTP bearer authentication. Cf. BasicHeaderApiTokenAuthenticator.