Class PassphraseCredentialsProvider

java.lang.Object
org.eclipse.jgit.transport.CredentialsProvider
org.springframework.cloud.config.server.support.PassphraseCredentialsProvider

public class PassphraseCredentialsProvider extends org.eclipse.jgit.transport.CredentialsProvider
A CredentialsProvider that uses a passphrase.
Author:
Chris Fraser
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Prompt to skip iteration for.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initialize the provider with a the ssh passphrase.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    get(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialItem... items)
    Ask for the credential items to be populated with the passphrase.
    boolean
    boolean
    supports(org.eclipse.jgit.transport.CredentialItem... items)

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

    get, getDefault, isAnyNull, reset, setDefault

    Methods inherited from class Object

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

  • Constructor Details

    • PassphraseCredentialsProvider

      public PassphraseCredentialsProvider(String passphrase)
      Initialize the provider with a the ssh passphrase.
      Parameters:
      passphrase - passphrase to populate the credential items with
  • Method Details

    • isInteractive

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

      public boolean supports(org.eclipse.jgit.transport.CredentialItem... items)
      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... items) throws org.eclipse.jgit.errors.UnsupportedCredentialItem
      Ask for the credential items to be populated with the passphrase.
      Specified by:
      get in class org.eclipse.jgit.transport.CredentialsProvider
      Parameters:
      uri - the URI of the remote resource that needs authentication.
      items - the items the application requires to complete authentication.
      Returns:
      true if the request was successful and values were supplied; false if the user canceled the request and did not supply all requested values.
      Throws:
      org.eclipse.jgit.errors.UnsupportedCredentialItem - if one of the items supplied is not supported.