public class ChainingCredentialsProvider extends CredentialsProvider
Constructor and Description |
---|
ChainingCredentialsProvider(CredentialsProvider... providers)
Create a new chaining credential provider.
|
Modifier and Type | Method and Description |
---|---|
boolean |
get(URIish uri,
CredentialItem... items)
Populates the credential items with the credentials provided by the first
credential provider in the list which populates them with non-null values
|
boolean |
isInteractive()
Check if the provider is interactive with the end-user.
|
boolean |
supports(CredentialItem... items)
Check if the provider can supply the necessary
CredentialItem s. |
get, getDefault, reset, setDefault
public ChainingCredentialsProvider(CredentialsProvider... providers)
providers
- credential providers asked for credentials in the order given
herepublic boolean isInteractive()
CredentialsProvider
isInteractive
in class CredentialsProvider
true
if any of the credential providers in the list is
interactive, otherwise false
CredentialsProvider.isInteractive()
public boolean supports(CredentialItem... items)
CredentialsProvider
CredentialItem
s.supports
in class CredentialsProvider
items
- the items the application requires to complete authentication.true
if any of the credential providers in the list
supports the requested items, otherwise false
CredentialsProvider.supports(org.eclipse.jgit.transport.CredentialItem[])
public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem
get
in class CredentialsProvider
uri
- the URI of the remote resource that needs authentication.items
- the items the application requires to complete authentication.true
if any of the credential providers in the list
supports the requested items, otherwise false
UnsupportedCredentialItem
- if one of the items supplied is not supported.CredentialsProvider.supports(org.eclipse.jgit.transport.CredentialItem[])
Copyright © 2015 Eclipse JGit Project. All rights reserved.