Skip to content

Commit 1968602

Browse files
Sync creds: use SHARED_SECRET_SIPPED instead of SHARED_SECRET #202
Also remove experimental marker.
1 parent 1cd4e4f commit 1968602

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

objectbox-java/src/main/java/io/objectbox/sync/SyncCredentials.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
package io.objectbox.sync;
22

3-
import io.objectbox.annotation.apihint.Experimental;
4-
53
/**
64
* Use the static helper methods to build Sync credentials,
75
* for example {@link #sharedSecret(String) SyncCredentials.sharedSecret("secret")}.
86
*/
97
@SuppressWarnings("unused")
10-
@Experimental
118
public class SyncCredentials {
129

1310
/**
1411
* Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes.
1512
* The string is expected to use UTF-8 characters.
1613
*/
1714
public static SyncCredentials sharedSecret(String secret) {
18-
return new SyncCredentialsToken(CredentialsType.SHARED_SECRET, secret);
15+
return new SyncCredentialsToken(CredentialsType.SHARED_SECRET_SIPPED, secret);
1916
}
2017

2118
/**
2219
* Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes.
2320
*/
2421
public static SyncCredentials sharedSecret(byte[] secret) {
25-
return new SyncCredentialsToken(CredentialsType.SHARED_SECRET, secret);
22+
return new SyncCredentialsToken(CredentialsType.SHARED_SECRET_SIPPED, secret);
2623
}
2724

2825
/**
@@ -44,10 +41,11 @@ public enum CredentialsType {
4441
// Note: this needs to match with CredentialsType in Core.
4542

4643
NONE(1),
47-
4844
SHARED_SECRET(2),
49-
50-
GOOGLE(3);
45+
GOOGLE(3),
46+
SHARED_SECRET_SIPPED(4),
47+
OBX_ADMIN_USER(5),
48+
USER_PASSWORD(6);
5149

5250
public final long id;
5351

0 commit comments

Comments
 (0)