Package com.couchbase.client.java.auth
Class CertAuthenticator
- java.lang.Object
-
- com.couchbase.client.java.auth.CertAuthenticator
-
- All Implemented Interfaces:
Authenticator
public class CertAuthenticator extends Object implements Authenticator
ThisAuthenticatorenables client certificate based authentication. Note that it doesn't actually handles any credentials at this point since the username is part of the certificate passed into theCouchbaseEnvironment.- Since:
- 1.6.0
- Author:
- Michael Nitschinger
-
-
Field Summary
Fields Modifier and Type Field Description static CertAuthenticatorINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Credential>getCredentials(CredentialContext context, String specific)Retrieve the credentials store by thisAuthenticatorfor the givenCredentialContextand optional specific.booleanisEmpty()
-
-
-
Field Detail
-
INSTANCE
public static CertAuthenticator INSTANCE
-
-
Method Detail
-
getCredentials
public List<Credential> getCredentials(CredentialContext context, String specific)
Description copied from interface:AuthenticatorRetrieve the credentials store by thisAuthenticatorfor the givenCredentialContextand 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 anIllegalArgumentException.- Specified by:
getCredentialsin interfaceAuthenticator- Parameters:
context- the context for which the credential(s) will be used.specific- a more restrictive sub-context specific to the context.- Returns:
- a list of credentials that can be used for the context/operation, or empty list if none was set for this context+specific combination.
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceAuthenticator- Returns:
- true if this
Authenticatordoesn't have any credentials set.
-
-