Package io.objectbox.sync
Class Credentials
java.lang.Object
io.objectbox.flatbuffers.Table
io.objectbox.sync.Credentials
Credentials consist of a type and the credentials data to perform authentication checks.
The data is either provided as plain-bytes, or as a list of strings.
Credentials can be used from the client and server side.
This depends on the type however:
for example, shared secrets are configured at both sides, but username/password is only provided at the client.
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription__assign
(int _i, ByteBuffer _bb) void
__init
(int _i, ByteBuffer _bb) static void
addBytes
(FlatBufferBuilder builder, int bytesOffset) static void
addStrings
(FlatBufferBuilder builder, int stringsOffset) static void
addType
(FlatBufferBuilder builder, long type) int
bytes
(int j) Credentials provided by plain bytes.int
bytesVector
(ByteVector obj) static int
createBytesVector
(FlatBufferBuilder builder, byte[] data) static int
createBytesVector
(FlatBufferBuilder builder, ByteBuffer data) static int
createCredentials
(FlatBufferBuilder builder, long type, int bytesOffset, int stringsOffset) static int
createStringsVector
(FlatBufferBuilder builder, int[] data) static int
endCredentials
(FlatBufferBuilder builder) static Credentials
static Credentials
getRootAsCredentials
(ByteBuffer _bb, Credentials obj) static void
startBytesVector
(FlatBufferBuilder builder, int numElems) static void
startCredentials
(FlatBufferBuilder builder) static void
startStringsVector
(FlatBufferBuilder builder, int numElems) strings
(int j) Credentials provided by a string array.int
long
type()
static void
Methods inherited from class io.objectbox.flatbuffers.Table
__has_identifier, __indirect, __indirect, __offset, __offset, __reset, __reset, __string, __string, __union, __union, __vector, __vector_as_bytebuffer, __vector_in_bytebuffer, __vector_len, compareStrings, compareStrings, getByteBuffer, keysCompare, sortTables
-
Constructor Details
-
Credentials
public Credentials()
-
-
Method Details
-
ValidateVersion
public static void ValidateVersion() -
getRootAsCredentials
-
getRootAsCredentials
-
__init
-
__assign
-
type
public long type() -
bytes
public int bytes(int j) Credentials provided by plain bytes. This is used for shared secrets (client & server). -
bytesLength
public int bytesLength() -
bytesVector
-
bytesVector
-
bytesAsByteBuffer
-
bytesInByteBuffer
-
strings
Credentials provided by a string array. For username/password (client-only), provide the username in strings[0] and the password in strings[1]. For GoogleAuth, you can provide a list of accepted IDs (server-only). -
stringsLength
public int stringsLength() -
stringsVector
-
stringsVector
-
createCredentials
public static int createCredentials(FlatBufferBuilder builder, long type, int bytesOffset, int stringsOffset) -
startCredentials
-
addType
-
addBytes
-
createBytesVector
-
createBytesVector
-
startBytesVector
-
addStrings
-
createStringsVector
-
startStringsVector
-
endCredentials
-