Package io.objectbox.sync
Class SyncCredentials
- java.lang.Object
-
- io.objectbox.sync.SyncCredentials
-
- Direct Known Subclasses:
SyncCredentialsToken
@Experimental public class SyncCredentials extends java.lang.ObjectUse the static helper methods to build Sync credentials, for exampleSyncCredentials.sharedSecret("secret").
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSyncCredentials.CredentialsType
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SyncCredentialsgoogle(java.lang.String idToken)Authenticate with a Google account ID token obtained via Google Sign-In.static SyncCredentialsnone()No authentication, unsecured.static SyncCredentialssharedSecret(byte[] secret)Authenticate with a shared secret.static SyncCredentialssharedSecret(java.lang.String secret)Authenticate with a shared secret.
-
-
-
Method Detail
-
sharedSecret
public static SyncCredentials sharedSecret(java.lang.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(java.lang.String idToken)
Authenticate with a Google account ID token obtained via Google Sign-In.
-
none
public static SyncCredentials none()
No authentication, unsecured. Use only for development and testing purposes.
-
-