|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.transport.CredentialsProvider
public abstract class CredentialsProvider
Provide credentials for use in connecting to Git repositories.
Implementors are strongly encouraged to support at least the minimal
CredentialItem.Username
and CredentialItem.Password
items.
More sophisticated implementors may implement additional types, such as
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
Constructor Summary | |
---|---|
CredentialsProvider()
|
Method Summary | |
---|---|
abstract boolean |
get(URIish uri,
CredentialItem... items)
Ask for the credential items to be populated. |
boolean |
get(URIish uri,
List<CredentialItem> items)
Ask for the credential items to be populated. |
static CredentialsProvider |
getDefault()
|
abstract boolean |
isInteractive()
Check if the provider is interactive with the end-user. |
void |
reset(URIish uri)
Reset the credentials provider for the given URI |
static void |
setDefault(CredentialsProvider p)
Set the default credentials provider. |
abstract boolean |
supports(CredentialItem... items)
Check if the provider can supply the necessary CredentialItem s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CredentialsProvider()
Method Detail |
---|
public static CredentialsProvider getDefault()
public static void setDefault(CredentialsProvider p)
p
- the new default provider, may be null to select no default.public abstract boolean isInteractive()
true
if the provider is interactive with the end-user.public abstract boolean supports(CredentialItem... items)
CredentialItem
s.
items
- the items the application requires to complete authentication.
true
if this CredentialsProvider
supports all of
the items supplied.public abstract boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem
uri
- the URI of the remote resource that needs authentication.items
- the items the application requires to complete authentication.
true
if the request was successful and values were
supplied; false
if the user canceled the request and did
not supply all requested values.
UnsupportedCredentialItem
- if one of the items supplied is not supported.public boolean get(URIish uri, List<CredentialItem> items) throws UnsupportedCredentialItem
uri
- the URI of the remote resource that needs authentication.items
- the items the application requires to complete authentication.
true
if the request was successful and values were
supplied; false
if the user canceled the request and did
not supply all requested values.
UnsupportedCredentialItem
- if one of the items supplied is not supported.public void reset(URIish uri)
uri
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |