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.CredentialsProviderACredentialsProviderthat uses a passphrase.- Author:
- Chris Fraser
-
-
Constructor Summary
Constructors Constructor Description PassphraseCredentialsProvider(String passphrase)Initialize the provider with a the ssh passphrase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanget(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialItem... items)Ask for the credential items to be populated with the passphrase.booleanisInteractive()booleansupports(org.eclipse.jgit.transport.CredentialItem... items)
-
-
-
Field Detail
-
PROMPT
public static final String PROMPT
Prompt to skip iteration for.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PassphraseCredentialsProvider
public PassphraseCredentialsProvider(String passphrase)
Initialize the provider with a the ssh passphrase.- Parameters:
passphrase- passphrase to populate the credential items with
-
-
Method Detail
-
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.UnsupportedCredentialItemAsk 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.
-
-