org.eclipse.jgit.transport.CredentialsProvider .
Most users should work with the specialized subclasses:
org.eclipse.jgit.transport.CredentialItem.Username for
usernamesorg.eclipse.jgit.transport.CredentialItem.Password for
passwordsorg.eclipse.jgit.transport.CredentialItem.StringType for other
general string informationorg.eclipse.jgit.transport.CredentialItem.CharArrayType for other
general secret information| Modifier and Type | Class and Description |
|---|---|
| public static class | CredentialItem.
An item whose value is stored as a char[] and is therefore clearable. |
| public static class | CredentialItem.
An advice message presented to the user, with no response required. |
| public static class | CredentialItem.
Prompt for a password, which is masked on input. |
| public static class | CredentialItem.
An item whose value is stored as a string. |
| public static class | CredentialItem.
Prompt for a username, which is not masked on input. |
| public static class | CredentialItem.
An item whose value is a boolean choice, presented as Yes/No. |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | CredentialItem(String
prompt to display to the user alongside of the input field.
Should be sufficient text to indicate what to supply for this
item. promptText, boolean true if the value should be masked from displaying during
input. This should be true for passwords and other secrets,
false for names and other public data. maskValue)Initialize a prompt. |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public String | |
| public boolean | Returns: true if the value should be masked when entered.Whether the value should be masked when entered. |
| promptText | back to summary |
|---|---|
| private final String promptText | |
| valueSecure | back to summary |
|---|---|
| private final boolean valueSecure | |
| CredentialItem | back to summary |
|---|---|
| public CredentialItem(String promptText, boolean maskValue) Initialize a prompt.
| |
| clear | back to summary |
|---|---|
| public abstract void clear() Clear the stored value, destroying it as much as possible. | |
| getPromptText | back to summary |
|---|---|
| public String getPromptText() Get prompt to display to the user.
| |
| isValueSecure | back to summary |
|---|---|
| public boolean isValueSecure() Whether the value should be masked when entered.
| |
| Modifier and Type | Field and Description |
|---|---|
| private char[] |
| Access | Constructor and Description |
|---|---|
| public | CharArrayType(String
prompt to display to the user alongside of the input
field. Should be sufficient text to indicate what to
supply for this item. promptText, boolean true if the value should be masked from displaying during
input. This should be true for passwords and other
secrets, false for names and other public data. maskValue)Initialize a prompt for a secure value stored in a character array. |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements abstract org. Destroys the current value, clearing the internal array. |
| public char[] | Returns: the current value array. The actual internal array is returned, reducing the number of copies present in memory.Get the current value. |
| public void | setValue(char[]
if not null, the array is copied. newValue)Set the new value, clearing the old value array. |
| public void | setValueNoCopy(char[]
the new internal array. The array is NOT copied. newValue)Set the new value, clearing the old value array. |
| value | back to summary |
|---|---|
| private char[] value | |
| CharArrayType | back to summary |
|---|---|
| public CharArrayType(String promptText, boolean maskValue) Initialize a prompt for a secure value stored in a character array.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements abstract org. Destroys the current value, clearing the internal array.
| |
| getValue | back to summary |
|---|---|
| public char[] getValue() Get the current value.
The returned array will be cleared out when
| |
| setValue | back to summary |
|---|---|
| public void setValue(char[] newValue) Set the new value, clearing the old value array.
| |
| setValueNoCopy | back to summary |
|---|---|
| public void setValueNoCopy(char[] newValue) Set the new value, clearing the old value array.
| |
| Access | Constructor and Description |
|---|---|
| public | InformationalMessage(String
message to display to the user. messageText)Initialize an informational message. |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements abstract org. Clear the stored value, destroying it as much as possible. |
| InformationalMessage | back to summary |
|---|---|
| public InformationalMessage(String messageText) Initialize an informational message.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements abstract org. Doc from org. Clear the stored value, destroying it as much as possible.
| |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Password | back to summary |
|---|---|
| public Password() Initialize a new password item, with a default password prompt. | |
| Password | back to summary |
|---|---|
| public Password(String msg) Initialize a new password item, with given prompt.
| |
CharArrayType instead, as
the internal members of the array can be cleared, reducing the chances
that the password is left in memory after authentication is completed.
| Access | Constructor and Description |
|---|---|
| public | StringType(String
prompt to display to the user alongside of the input
field. Should be sufficient text to indicate what to
supply for this item. promptText, boolean true if the value should be masked from displaying during
input. This should be true for passwords and other
secrets, false for names and other public data. maskValue)Initialize a prompt for a single string. |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements abstract org. Clear the stored value, destroying it as much as possible. |
| public String | |
| public void |
| value | back to summary |
|---|---|
| private String value | |
| StringType | back to summary |
|---|---|
| public StringType(String promptText, boolean maskValue) Initialize a prompt for a single string.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements abstract org. Doc from org. Clear the stored value, destroying it as much as possible.
| |
| getValue | back to summary |
|---|---|
| public String getValue() Get value
| |
| setValue | back to summary |
|---|---|
| public void setValue(String newValue) Set value
| |
| Access | Constructor and Description |
|---|---|
| public |
| Username | back to summary |
|---|---|
| public Username() Initialize a new username item, with a default username prompt. | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements abstract org. Clear the stored value, destroying it as much as possible. |
| public boolean | |
| public void |
| value | back to summary |
|---|---|
| private boolean value | |
| YesNoType | back to summary |
|---|---|
| public YesNoType(String promptText) Initialize a prompt for a single boolean answer.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements abstract org. Doc from org. Clear the stored value, destroying it as much as possible.
| |
| getValue | back to summary |
|---|---|
| public boolean getValue() Get value
| |
| setValue | back to summary |
|---|---|
| public void setValue(boolean newValue) Set the new value.
| |