Class SmartCredentialsProvider
java.lang.Object
org.eclipse.jgit.transport.CredentialsProvider
org.jenkinsci.plugins.gitclient.jgit.SmartCredentialsProvider
- Direct Known Subclasses:
SmartCredentialsProvider
public class SmartCredentialsProvider
extends org.eclipse.jgit.transport.CredentialsProvider
SmartCredentialsProvider class.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSmartCredentialsProvider
(TaskListener listener) Constructor for SmartCredentialsProvider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCredentials
(String url, com.cloudbees.plugins.credentials.common.StandardCredentials credentials) Adds credentials to be used against a specific url.void
addDefaultCredentials
(com.cloudbees.plugins.credentials.common.StandardCredentials credentials) Adds credentials to be used when there are not url specific credentials defined.void
Remove all credentials from the client.boolean
get
(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialItem... credentialItems) boolean
boolean
supports
(org.eclipse.jgit.transport.CredentialItem... credentialItems) Methods inherited from class org.eclipse.jgit.transport.CredentialsProvider
get, getDefault, isAnyNull, reset, setDefault
-
Field Details
-
listener
-
-
Constructor Details
-
SmartCredentialsProvider
Constructor for SmartCredentialsProvider.- Parameters:
listener
- aTaskListener
object.
-
-
Method Details
-
clearCredentials
public void clearCredentials()Remove all credentials from the client.- Since:
- 1.2.0
-
addCredentials
public void addCredentials(String url, com.cloudbees.plugins.credentials.common.StandardCredentials credentials) Adds credentials to be used against a specific url.- Parameters:
url
- the url for the credentials to be used against.credentials
- the credentials to use.- Since:
- 1.2.0
-
getCredentials
-
addDefaultCredentials
public void addDefaultCredentials(com.cloudbees.plugins.credentials.common.StandardCredentials credentials) Adds credentials to be used when there are not url specific credentials defined.- Parameters:
credentials
- the credentials to use.- Since:
- 1.2.0
- See Also:
-
isInteractive
public boolean isInteractive()- Specified by:
isInteractive
in classorg.eclipse.jgit.transport.CredentialsProvider
-
supports
public boolean supports(org.eclipse.jgit.transport.CredentialItem... credentialItems) - Specified by:
supports
in classorg.eclipse.jgit.transport.CredentialsProvider
-
get
public boolean get(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialItem... credentialItems) throws org.eclipse.jgit.errors.UnsupportedCredentialItem - Specified by:
get
in classorg.eclipse.jgit.transport.CredentialsProvider
- Throws:
org.eclipse.jgit.errors.UnsupportedCredentialItem
-