Class SyncCredentials

    • Method Detail

      • sharedSecret

        public static SyncCredentials sharedSecret​(java.lang.String secret)
        Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes. The string is expected to use UTF-8 characters.
      • sharedSecret

        public static SyncCredentials sharedSecret​(byte[] secret)
        Authenticate with a shared secret. This could be a passphrase, big number or randomly chosen bytes.
      • google

        public static SyncCredentials google​(java.lang.String idToken)
        Authenticate with a Google account ID token obtained via Google Sign-In.
      • obxAdminUser

        public static SyncCredentials obxAdminUser​(java.lang.String user,
                                                   java.lang.String password)
        ObjectBox admin users (username/password)
      • userAndPassword

        public static SyncCredentials userAndPassword​(java.lang.String user,
                                                      java.lang.String password)
        Generic credential type suitable for ObjectBox admin (and possibly others in the future)
      • jwtIdToken

        public static SyncCredentials jwtIdToken​(java.lang.String jwtIdToken)
        JSON Web Token (JWT): an ID token that typically provides identity information about the authenticated user.
      • jwtAccessToken

        public static SyncCredentials jwtAccessToken​(java.lang.String jwtAccessToken)
        JSON Web Token (JWT): an access token that is used to access resources.
      • jwtRefreshToken

        public static SyncCredentials jwtRefreshToken​(java.lang.String jwtRefreshToken)
        JSON Web Token (JWT): a refresh token that is used to obtain a new access token.
      • jwtCustomToken

        public static SyncCredentials jwtCustomToken​(java.lang.String jwtCustomToken)
        JSON Web Token (JWT): a token that is neither an ID, access, nor refresh token.
      • none

        public static SyncCredentials none()
        No authentication, unsecured. Use only for development and testing purposes.
      • getTypeId

        public long getTypeId()
      • createClone

        abstract SyncCredentials createClone()
        Creates a copy of these credentials.

        This can be useful to use the same credentials when creating multiple clients or a server in combination with a client as some credentials may get cleared when building a client or server.