Class SyncCredentials

java.lang.Object
io.objectbox.sync.SyncCredentials
Direct Known Subclasses:
SyncCredentialsToken, SyncCredentialsUserPassword

public class SyncCredentials extends Object
Use the static helper methods to build Sync credentials, for example SyncCredentials.sharedSecret("secret").
  • Method Details

    • sharedSecret

      public static SyncCredentials sharedSecret(String secret)
      Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes. The string is expected to use UTF-8 characters.
    • sharedSecret

      public static SyncCredentials sharedSecret(byte[] secret)
      Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes.
    • google

      public static SyncCredentials google(String idToken)
      Authenticate with a Google account ID token obtained via Google Sign-In.
    • userAndPassword

      public static SyncCredentials userAndPassword(String user, String password)
    • none

      public static SyncCredentials none()
      No authentication, unsecured. Use only for development and testing purposes.
    • getType

    • getTypeId

      public long getTypeId()