Top Description Fields Constructors Methods
org.eclipse.jgit.console

public Class ConsoleCredentialsProvider

extends CredentialsProvider
Class Inheritance
Imports
java.io.Console, org.eclipse.jgit.errors.UnsupportedCredentialItem, org.eclipse.jgit.pgm.internal.CLIText, org.eclipse.jgit.transport.ChainingCredentialsProvider, .CredentialItem, .CredentialsProvider, .NetRCCredentialsProvider, .URIish

Interacts with the user during authentication by using the text console.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final Console

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
get(URIish
the URI of the remote resource that needs authentication.
uri
,
CredentialItem...
the items the application requires to complete authentication.
items
)

Implements abstract org.eclipse.jgit.transport.CredentialsProvider.get.

Ask for the credential items to be populated.

private boolean
private boolean
private boolean
private boolean
public static void
install()

Install this implementation as the default.

public boolean
isInteractive()

Implements abstract org.eclipse.jgit.transport.CredentialsProvider.isInteractive.

Check if the provider is interactive with the end-user.

public boolean
supports(CredentialItem...
the items the application requires to complete authentication.
items
)

Implements abstract org.eclipse.jgit.transport.CredentialsProvider.supports.

Check if the provider can supply the necessary org.eclipse.jgit.transport.CredentialItems.

Inherited from org.eclipse.jgit.transport.CredentialsProvider:
getgetDefaultisAnyNullresetsetDefault

Field Detail

consback to summary
private final Console cons

Constructor Detail

ConsoleCredentialsProviderback to summary
public ConsoleCredentialsProvider()

Method Detail

getback to summary
public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem

Implements abstract org.eclipse.jgit.transport.CredentialsProvider.get.

Doc from org.eclipse.jgit.transport.CredentialsProvider.get.

Ask for the credential items to be populated.

Parameters
uri:URIish

the URI of the remote resource that needs authentication.

items:CredentialItem[]

the items the application requires to complete authentication.

Returns:boolean

true if the request was successful and values were supplied; false if the user canceled the request and did not supply all requested values.

Annotations
@Override
Exceptions
UnsupportedCredentialItem:
if one of the items supplied is not supported.
getback to summary
private boolean get(CredentialItem.StringType item)
getback to summary
private boolean get(CredentialItem.CharArrayType item)
getback to summary
private boolean get(CredentialItem.InformationalMessage item)
getback to summary
private boolean get(CredentialItem.YesNoType item)
installback to summary
public static void install()

Install this implementation as the default.

isInteractiveback to summary
public boolean isInteractive()

Implements abstract org.eclipse.jgit.transport.CredentialsProvider.isInteractive.

Doc from org.eclipse.jgit.transport.CredentialsProvider.isInteractive.

Check if the provider is interactive with the end-user. An interactive provider may try to open a dialog box, or prompt for input on the terminal, and will wait for a user response. A non-interactive provider will either populate CredentialItems, or fail.

Returns:boolean

true if the provider is interactive with the end-user.

Annotations
@Override
supportsback to summary
public boolean supports(CredentialItem... items)

Implements abstract org.eclipse.jgit.transport.CredentialsProvider.supports.

Doc from org.eclipse.jgit.transport.CredentialsProvider.supports.

Check if the provider can supply the necessary org.eclipse.jgit.transport.CredentialItems.

Parameters
items:CredentialItem[]

the items the application requires to complete authentication.

Returns:boolean

true if this org.eclipse.jgit.transport.CredentialsProvider supports all of the items supplied.

Annotations
@Override