Class Credentials

java.lang.Object
io.objectbox.flatbuffers.Table
io.objectbox.sync.Credentials

public final class Credentials extends Table
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.
  • Constructor Details

    • Credentials

      public Credentials()
  • Method Details

    • ValidateVersion

      public static void ValidateVersion()
    • getRootAsCredentials

      public static Credentials getRootAsCredentials(ByteBuffer _bb)
    • getRootAsCredentials

      public static Credentials getRootAsCredentials(ByteBuffer _bb, Credentials obj)
    • __init

      public void __init(int _i, ByteBuffer _bb)
    • __assign

      public Credentials __assign(int _i, ByteBuffer _bb)
    • 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

      public ByteVector bytesVector()
    • bytesVector

      public ByteVector bytesVector(ByteVector obj)
    • bytesAsByteBuffer

      public ByteBuffer bytesAsByteBuffer()
    • bytesInByteBuffer

      public ByteBuffer bytesInByteBuffer(ByteBuffer _bb)
    • strings

      public String strings(int j)
      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

      public StringVector stringsVector()
    • stringsVector

      public StringVector stringsVector(StringVector obj)
    • createCredentials

      public static int createCredentials(FlatBufferBuilder builder, long type, int bytesOffset, int stringsOffset)
    • startCredentials

      public static void startCredentials(FlatBufferBuilder builder)
    • addType

      public static void addType(FlatBufferBuilder builder, long type)
    • addBytes

      public static void addBytes(FlatBufferBuilder builder, int bytesOffset)
    • createBytesVector

      public static int createBytesVector(FlatBufferBuilder builder, byte[] data)
    • createBytesVector

      public static int createBytesVector(FlatBufferBuilder builder, ByteBuffer data)
    • startBytesVector

      public static void startBytesVector(FlatBufferBuilder builder, int numElems)
    • addStrings

      public static void addStrings(FlatBufferBuilder builder, int stringsOffset)
    • createStringsVector

      public static int createStringsVector(FlatBufferBuilder builder, int[] data)
    • startStringsVector

      public static void startStringsVector(FlatBufferBuilder builder, int numElems)
    • endCredentials

      public static int endCredentials(FlatBufferBuilder builder)