Skip to content

Commit 3da3a4b

Browse files
Server options: drop re-mapping to SHARED_SECRET workaround
1 parent 33eb12b commit 3da3a4b

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public static SyncCredentials none() {
6262
public enum CredentialsType {
6363

6464
NONE(io.objectbox.sync.CredentialsType.None),
65-
SHARED_SECRET(io.objectbox.sync.CredentialsType.SharedSecret),
6665
GOOGLE(io.objectbox.sync.CredentialsType.GoogleAuth),
6766
SHARED_SECRET_SIPPED(io.objectbox.sync.CredentialsType.SharedSecretSipped),
6867
OBX_ADMIN_USER(io.objectbox.sync.CredentialsType.ObxAdminUser),

objectbox-java/src/main/java/io/objectbox/sync/server/SyncServerBuilder.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,7 @@ private int buildCredentials(FlatBufferBuilder fbb, SyncCredentialsToken tokenCr
204204
}
205205

206206
Credentials.startCredentials(fbb);
207-
// TODO Will this still be necessary?
208-
// The core API used by nativeSetAuthenticator only supports the NONE and SHARED_SECRET types
209-
// (however, protocol v3 versions do also add SHARED_SECRET_SIPPED if SHARED_SECRET is given).
210-
final SyncCredentials.CredentialsType type = tokenCredentials.getType() == SyncCredentials.CredentialsType.SHARED_SECRET_SIPPED
211-
? SyncCredentials.CredentialsType.SHARED_SECRET
212-
: tokenCredentials.getType();
213-
Credentials.addType(fbb, type.id);
207+
Credentials.addType(fbb, tokenCredentials.getTypeId());
214208
if (tokenBytesOffset > 0) {
215209
Credentials.addBytes(fbb, tokenBytesOffset);
216210
}

0 commit comments

Comments
 (0)