Class RemoteCredentials
java.lang.Object
org.jenkins.plugins.lockableresources.remote.RemoteCredentials
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class RemoteCredentials
extends Object
Resolves the HTTP
Authorization header for a remote connection from its configured
username/password credentials (Basic auth). Credentials are looked up first in the Run context
(so per-folder credentials work), then in the system (global) store.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbasicAuthHeader(RemoteConnection remote, Run<?, ?> run)
-
Method Details
-
basicAuthHeader
- Returns:
- a
"Basic <base64>"header value, or""when the connection has nocredentialsId. Fails the build (viaAbortException) when the referenced credentials cannot be found. - Throws:
AbortException
-