Interface CredentialsProvider
-
@Deprecated public interface CredentialsProviderDeprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.Credentials provider interface can be used to provide
HTTP methodwith a means to request authentication credentials if no credentials have been given or given credentials are incorrect.HttpClient makes no provisions to check whether the same credentials have been tried already. It is a responsibility of the custom credentials provider to keep track of authentication attempts and to ensure that credentials known to be invalid are not retried. HttpClient will simply store the set of credentials returned by the custom credentials provider in the
http stateobject and will attempt to use these credentials for all subsequent requests with the given authentication scope.Classes implementing this interface must synchronize access to shared data as methods of this interfrace may be executed from multiple threads
- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROVIDERDeprecated.Sets the credentials provider parameter.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CredentialsgetCredentials(AuthScheme scheme, java.lang.String host, int port, boolean proxy)Deprecated.Requests additionalauthentication credentials.
-
-
-
Field Detail
-
PROVIDER
static final java.lang.String PROVIDER
Deprecated.Sets the credentials provider parameter.This parameter expects a value of type
CredentialsProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCredentials
Credentials getCredentials(AuthScheme scheme, java.lang.String host, int port, boolean proxy) throws CredentialsNotAvailableException
Deprecated.Requests additionalauthentication credentials.- Parameters:
scheme- theauthentication schemehost- the authentication hostport- the port of the authentication hostproxy- true if authenticating with a proxy, false otherwise- Throws:
CredentialsNotAvailableException
-
-