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 voidaddBytes(FlatBufferBuilder builder, int bytesOffset) static voidaddStrings(FlatBufferBuilder builder, int stringsOffset) static voidaddType(FlatBufferBuilder builder, long type) intbytes(int j) Credentials provided by plain bytes.intbytesVector(ByteVector obj) static intcreateBytesVector(FlatBufferBuilder builder, byte[] data) static intcreateBytesVector(FlatBufferBuilder builder, ByteBuffer data) static intcreateCredentials(FlatBufferBuilder builder, long type, int bytesOffset, int stringsOffset) static intcreateStringsVector(FlatBufferBuilder builder, int[] data) static intendCredentials(FlatBufferBuilder builder) static Credentialsstatic CredentialsgetRootAsCredentials(ByteBuffer _bb, Credentials obj) static voidstartBytesVector(FlatBufferBuilder builder, int numElems) static voidstartCredentials(FlatBufferBuilder builder) static voidstartStringsVector(FlatBufferBuilder builder, int numElems) strings(int j) Credentials provided by a string array.intlongtype()static voidMethods 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
-