public abstract class Auth2 extends AbstractDescribableImpl<Auth2> implements Serializable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Auth2.Auth2Descriptor |
Constructor and Description |
---|
Auth2() |
Modifier and Type | Method and Description |
---|---|
static DescriptorExtensionList<Auth2,Auth2.Auth2Descriptor> |
all() |
Auth2 |
clone() |
abstract void |
setAuthorizationHeader(URLConnection connection,
BuildContext context)
Depending on the purpose the Auth2 implementation has to override the
Authorization header of the connection appropriately. |
abstract String |
toString() |
abstract String |
toString(Item item)
Returns a string representing the authorization.
|
getDescriptor
public static DescriptorExtensionList<Auth2,Auth2.Auth2Descriptor> all()
public abstract void setAuthorizationHeader(URLConnection connection, BuildContext context) throws IOException
Authorization
header of the connection appropriately. It might also ignore this
step or remove an existing Authorization
header.connection
- connection between the application and the remote server.context
- the context of this Builder/BuildStep.IOException
- if there is an error generating the authorization header.public abstract String toString(Item item)
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.public Auth2 clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2016–2023. All rights reserved.