Package com.couchbase.lite
Class BasicAuthenticator
java.lang.Object
com.couchbase.lite.internal.BaseAuthenticator
com.couchbase.lite.BasicAuthenticator
- All Implemented Interfaces:
Authenticator
public final class BasicAuthenticator
extends com.couchbase.lite.internal.BaseAuthenticator
The BasicAuthenticator class is an authenticator that will authenticate using HTTP Basic
auth with the given username and password. This should only be used over an SSL/TLS connection,
as otherwise it's very easy for anyone sniffing network traffic to read the password.
-
Constructor Summary
ConstructorDescriptionBasicAuthenticator
(String username, char[] password) Create a Basic Authenticator. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
authenticate
(Map<String, Object> options) protected void
finalize()
Deprecated.char[]
Get the password.
-
Constructor Details
-
BasicAuthenticator
Create a Basic Authenticator. The new instance contains a copy of the password char[] parameter: the owner of the original retains the responsibility for zeroing it before releasing it.
-
-
Method Details
-
getUsername
-
getPassword
Deprecated.UsegetPasswordChars(char[])
-
getPasswordChars
@NonNull public char[] getPasswordChars()Get the password. The returned char[] is a copy: the owner is responsible for zeroing it before releasing it.- Returns:
- the password, as a char[].
-
finalize
-
authenticate
- Specified by:
authenticate
in classcom.couchbase.lite.internal.BaseAuthenticator
-
getPasswordChars(char[])