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
Fields Modifier and Type Field Description TaskListener
listener
-
Constructor Summary
Constructors Constructor Description SmartCredentialsProvider(TaskListener listener)
Constructor for SmartCredentialsProvider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
clearCredentials()
Remove all credentials from the client.boolean
get(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialItem... credentialItems)
Map<String,com.cloudbees.plugins.credentials.common.StandardCredentials>
getCredentials()
boolean
isInteractive()
boolean
supports(org.eclipse.jgit.transport.CredentialItem... credentialItems)
-
-
-
Field Detail
-
listener
public final TaskListener listener
-
-
Constructor Detail
-
SmartCredentialsProvider
public SmartCredentialsProvider(TaskListener listener)
Constructor for SmartCredentialsProvider.- Parameters:
listener
- aTaskListener
object.
-
-
Method Detail
-
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
public Map<String,com.cloudbees.plugins.credentials.common.StandardCredentials> 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:
addCredentials(String, StandardCredentials)
-
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
-
-