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
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for SmartCredentialsProvider.
  • Method Summary

    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
    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>
     
    boolean
    boolean
    supports(org.eclipse.jgit.transport.CredentialItem... credentialItems)

    Methods inherited from class org.eclipse.jgit.transport.CredentialsProvider

    get, getDefault, isAnyNull, reset, setDefault

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SmartCredentialsProvider

      public SmartCredentialsProvider(TaskListener listener)
      Constructor for SmartCredentialsProvider.
      Parameters:
      listener - a TaskListener 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

      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:
    • isInteractive

      public boolean isInteractive()
      Specified by:
      isInteractive in class org.eclipse.jgit.transport.CredentialsProvider
    • supports

      public boolean supports(org.eclipse.jgit.transport.CredentialItem... credentialItems)
      Specified by:
      supports in class org.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 class org.eclipse.jgit.transport.CredentialsProvider
      Throws:
      org.eclipse.jgit.errors.UnsupportedCredentialItem