Class Credential

java.lang.Object
com.couchbase.analytics.client.java.Credential

@ThreadSafe public abstract class Credential extends Object
Create an instance like this:
 Credential.of(username, password)
 

For advanced use cases involving dynamic credentials, see ofDynamic(Supplier).

  • Method Details

    • of

      public static Credential of(String username, String password)
      Returns a new instance that holds the given username and password.
    • ofDynamic

      public static Credential ofDynamic(Supplier<Credential> supplier)
      Returns a new instance of a dynamic credential that invokes the given supplier every time a credential is required.

      This enables updating a credential without having to restart your application.