org.eclipse.jgit.transport.CredentialItem.Username and
org.eclipse.jgit.transport.CredentialItem.Password items. More
sophisticated implementors may implement additional types, such as
org.eclipse.jgit.transport.CredentialItem.StringType .
CredentialItems are usually presented in bulk, allowing implementors to
combine them into a single UI widget and streamline the authentication
process for an end-user.
UsernamePasswordCredentialsProvider
| Modifier and Type | Field and Description |
|---|---|
| private static volatile CredentialsProvider |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | 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.the URI of the remote resource that needs authentication. uri, CredentialItem... the items the application requires to complete authentication. items)Ask for the credential items to be populated. |
| public boolean | 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.the URI of the remote resource that needs authentication. uri, List<CredentialItem> the items the application requires to complete authentication. items)Ask for the credential items to be populated. |
| public static CredentialsProvider | Returns: the default credentials provider, or null.Get the default credentials provider, or null. |
| protected static boolean | Returns: true if any of the passed items is null, false
otherwisecredential items to check items)Whether any of the passed items is null |
| public abstract boolean | Returns: true if the provider is interactive with the end-user.Check if the provider is interactive with the end-user. |
| public void | reset(URIish
a uri)org. object.Reset the credentials provider for the given URI |
| public static void | setDefault(CredentialsProvider
the new default provider, may be null to select no default. p)Set the default credentials provider. |
| public abstract boolean | Returns: true if this
org. supports
all of the items supplied.the items the application requires to complete authentication. items)Check if the provider can supply the necessary
|
| defaultProvider | back to summary |
|---|---|
| private static volatile CredentialsProvider defaultProvider | |
| CredentialsProvider | back to summary |
|---|---|
| public CredentialsProvider() | |
| get | back to summary |
|---|---|
| public abstract boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem Ask for the credential items to be populated.
| |
| get | back to summary |
|---|---|
| public boolean get(URIish uri, List<CredentialItem> items) throws UnsupportedCredentialItem Ask for the credential items to be populated.
| |
| getDefault | back to summary |
|---|---|
| public static CredentialsProvider getDefault() Get the default credentials provider, or null.
| |
| isAnyNull | back to summary |
|---|---|
| protected static boolean isAnyNull(CredentialItem... items) Whether any of the passed items is null
| |
| isInteractive | back to summary |
|---|---|
| public abstract boolean 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.
| |
| reset | back to summary |
|---|---|
| public void reset(URIish uri) Reset the credentials provider for the given URI
| |
| setDefault | back to summary |
|---|---|
| public static void setDefault(CredentialsProvider p) Set the default credentials provider.
| |
| supports | back to summary |
|---|---|
| public abstract boolean supports(CredentialItem... items) Check if the provider can supply the necessary
| |