java.lang.Object
hudson.model.AbstractDescribableImpl<Auth2>
org.jenkinsci.plugins.ParameterizedRemoteTrigger.auth2.Auth2
All Implemented Interfaces:
Describable<Auth2>, Serializable, Cloneable
Direct Known Subclasses:
BearerTokenAuth, CredentialsAuth, NoneAuth, NullAuth, TokenAuth

public abstract class Auth2 extends AbstractDescribableImpl<Auth2> implements Serializable, Cloneable
See Also:
  • Constructor Details

    • Auth2

      public Auth2()
  • Method Details

    • all

    • setAuthorizationHeader

      public abstract void setAuthorizationHeader(URLConnection connection, BuildContext context) throws IOException
      Depending on the purpose the Auth2 implementation has to override the Authorization header of the connection appropriately. It might also ignore this step or remove an existing Authorization header.
      Parameters:
      connection - connection between the application and the remote server.
      context - the context of this Builder/BuildStep.
      Throws:
      IOException - if there is an error generating the authorization header.
    • toString

      public abstract String toString()
      Overrides:
      toString in class Object
    • toString

      public abstract String toString(Item item)
      Returns a string representing the authorization.
      Parameters:
      item - the Item (Job, Pipeline,...) we are currently running in. The item is required to also get Credentials which are defined in the items scope and not Jenkins globally. Value can be null, but Credentials e.g. configured on a Folder will not be found in this case, only globally configured Credentials.
      Returns:
      a string representing the authorization.
    • clone

      public Auth2 clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException