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 -
Constructor Summary
ConstructorsConstructorDescriptionPassphraseCredentialsProvider(String passphrase) Initialize the provider with a the ssh passphrase. -
Method Summary
Methods inherited from class org.eclipse.jgit.transport.CredentialsProvider
get, getDefault, isAnyNull, reset, setDefault
-
Field Details
-
PROMPT
-
-
Constructor Details
-
PassphraseCredentialsProvider
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:
isInteractivein classorg.eclipse.jgit.transport.CredentialsProvider
-
supports
public boolean supports(org.eclipse.jgit.transport.CredentialItem... items) - Specified by:
supportsin classorg.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:
getin classorg.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:
trueif the request was successful and values were supplied;falseif 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.
-