Package com.couchbase.client.core.env
Class RoleBasedCredentials
- java.lang.Object
-
- com.couchbase.client.core.env.RoleBasedCredentials
-
- All Implemented Interfaces:
Credentials
public class RoleBasedCredentials extends Object implements Credentials
-
-
Constructor Summary
Constructors Constructor Description RoleBasedCredentials(String username, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
passwordForBucket(String bucket)
Returns the corresponding password for a given bucket.String
usernameForBucket(String bucket)
Returns the corresponding username for a given bucket.
-
-
-
Method Detail
-
usernameForBucket
public String usernameForBucket(String bucket)
Description copied from interface:Credentials
Returns the corresponding username for a given bucket.- Specified by:
usernameForBucket
in interfaceCredentials
- Parameters:
bucket
- the name of the bucket.- Returns:
- the username for the given bucket.
-
passwordForBucket
public String passwordForBucket(String bucket)
Description copied from interface:Credentials
Returns the corresponding password for a given bucket.- Specified by:
passwordForBucket
in interfaceCredentials
- Parameters:
bucket
- the name of the bucket.- Returns:
- the password for the given bucket.
-
-