Class Auth2
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:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionall()
clone()
abstract void
setAuthorizationHeader
(URLConnection connection, BuildContext context) Depending on the purpose the Auth2 implementation has to override theAuthorization
header of the connection appropriately.abstract String
toString()
abstract String
Returns a string representing the authorization.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
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 theAuthorization
header of the connection appropriately. It might also ignore this step or remove an existingAuthorization
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
-
toString
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
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-