File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
objectbox-java/src/main/java/io/objectbox/sync Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
1
package io .objectbox .sync ;
2
2
3
- import io .objectbox .annotation .apihint .Experimental ;
4
-
5
3
/**
6
4
* Use the static helper methods to build Sync credentials,
7
5
* for example {@link #sharedSecret(String) SyncCredentials.sharedSecret("secret")}.
8
6
*/
9
7
@ SuppressWarnings ("unused" )
10
- @ Experimental
11
8
public class SyncCredentials {
12
9
13
10
/**
14
11
* Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes.
15
12
* The string is expected to use UTF-8 characters.
16
13
*/
17
14
public static SyncCredentials sharedSecret (String secret ) {
18
- return new SyncCredentialsToken (CredentialsType .SHARED_SECRET , secret );
15
+ return new SyncCredentialsToken (CredentialsType .SHARED_SECRET_SIPPED , secret );
19
16
}
20
17
21
18
/**
22
19
* Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes.
23
20
*/
24
21
public static SyncCredentials sharedSecret (byte [] secret ) {
25
- return new SyncCredentialsToken (CredentialsType .SHARED_SECRET , secret );
22
+ return new SyncCredentialsToken (CredentialsType .SHARED_SECRET_SIPPED , secret );
26
23
}
27
24
28
25
/**
@@ -44,10 +41,11 @@ public enum CredentialsType {
44
41
// Note: this needs to match with CredentialsType in Core.
45
42
46
43
NONE (1 ),
47
-
48
44
SHARED_SECRET (2 ),
49
-
50
- GOOGLE (3 );
45
+ GOOGLE (3 ),
46
+ SHARED_SECRET_SIPPED (4 ),
47
+ OBX_ADMIN_USER (5 ),
48
+ USER_PASSWORD (6 );
51
49
52
50
public final long id ;
53
51
You can’t perform that action at this time.
0 commit comments