@InterfaceStability.Committed @InterfaceAudience.Private public class ClassicAuthenticator extends Object implements Authenticator
An Authenticator based on login/password credentials.
| Constructor and Description |
|---|
ClassicAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
ClassicAuthenticator |
bucket(String bucketName,
String password)
Sets the
CredentialContext.BUCKET_KV / CredentialContext.BUCKET_N1QL credential for the the bucketName specific. |
ClassicAuthenticator |
cluster(String adminName,
String adminPassword)
Sets the
CredentialContext.CLUSTER_MANAGEMENT credential. |
List<Credential> |
getCredentials(CredentialContext context,
String specific)
Retrieve the credentials store by this
Authenticator for the given CredentialContext and optional specific. |
boolean |
isEmpty() |
public List<Credential> getCredentials(CredentialContext context, String specific)
AuthenticatorRetrieve the credentials store by this Authenticator for the given CredentialContext and optional specific. If no corresponding credential can be found, an empty list is returned. If the context / specific cannot be processed by this Authenticator, throws an IllegalArgumentException.
getCredentials in interface Authenticatorcontext - the context for which the credential(s) will be used.specific - a more restrictive sub-context specific to the context.public boolean isEmpty()
isEmpty in interface AuthenticatorAuthenticator doesn’t have any credentials set.public ClassicAuthenticator bucket(String bucketName, String password)
Sets the CredentialContext.BUCKET_KV / CredentialContext.BUCKET_N1QL credential for the the bucketName specific.
bucketName - the name of the bucket for which to set a password.password - the password for the bucket.ClassicAuthenticator for chaining.public ClassicAuthenticator cluster(String adminName, String adminPassword)
Sets the CredentialContext.CLUSTER_MANAGEMENT credential. Specific is ignored in this context.
adminName - the administrative login to use.adminPassword - the administrative password to use.ClassicAuthenticator for chaining.Copyright © 2015 Couchbase, Inc.