Class SyncCredentials
- Direct Known Subclasses:
SyncCredentialsToken
,SyncCredentialsUserPassword
SyncCredentials.sharedSecret("secret")
.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetType()
long
static SyncCredentials
Authenticate with a Google account ID token obtained via Google Sign-In.static SyncCredentials
jwtAccessToken
(String jwtAccessToken) Authenticate with a JSON Web Token (JWT) that is an access token.static SyncCredentials
Enable authentication using a JSON Web Token (JWT) that is an access token.static SyncCredentials
jwtCustomToken
(String jwtCustomToken) Authenticate with a JSON Web Token (JWT) that is neither an ID, access, nor refresh token.static SyncCredentials
Enable authentication using a JSON Web Token (JWT) that is neither an ID, access, nor refresh token.static SyncCredentials
jwtIdToken
(String jwtIdToken) Authenticate with a JSON Web Token (JWT) that is an ID token.static SyncCredentials
Enable authentication using a JSON Web Token (JWT) that is an ID token.static SyncCredentials
jwtRefreshToken
(String jwtRefreshToken) Authenticate with a JSON Web Token (JWT) that is a refresh token.static SyncCredentials
Enable authentication using a JSON Web Token (JWT) that is a refresh token.static SyncCredentials
none()
No authentication, unsecured.static SyncCredentials
obxAdminUser
(String user, String password) ObjectBox Admin user (username and password).static SyncCredentials
sharedSecret
(byte[] secret) Authenticate with a shared secret.static SyncCredentials
sharedSecret
(String secret) Authenticate with a shared secret.static SyncCredentials
userAndPassword
(String user, String password) Generic credentials type suitable for ObjectBox Admin (and possibly others in the future).
-
Method Details
-
google
Authenticate with a Google account ID token obtained via Google Sign-In. -
obxAdminUser
ObjectBox Admin user (username and password). -
userAndPassword
Generic credentials type suitable for ObjectBox Admin (and possibly others in the future). -
jwtIdToken
Authenticate with a JSON Web Token (JWT) that is an ID token.An ID token typically provides identity information about the authenticated user.
Use this and the other JWT methods that accept a token to configure JWT auth for a Sync client or server peer. To configure Sync server auth options, use the server variants, like
jwtIdTokenServer()
, instead.See the JWT authentication documentation for details.
-
jwtAccessToken
Authenticate with a JSON Web Token (JWT) that is an access token.An access token is used to access resources.
See
jwtIdToken(String)
for some common remarks. -
jwtRefreshToken
Authenticate with a JSON Web Token (JWT) that is a refresh token.A refresh token is used to obtain a new access token.
See
jwtIdToken(String)
for some common remarks. -
jwtCustomToken
Authenticate with a JSON Web Token (JWT) that is neither an ID, access, nor refresh token.See
jwtIdToken(String)
for some common remarks. -
jwtIdTokenServer
Enable authentication using a JSON Web Token (JWT) that is an ID token.An ID token typically provides identity information about the authenticated user.
Use this and the other JWT server credentials types to configure a Sync server. For Sync clients, use the ones that accept a token, like
jwtIdToken(String)
, instead.See the JWT authentication documentation for details.
-
jwtAccessTokenServer
Enable authentication using a JSON Web Token (JWT) that is an access token.An access token is used to access resources.
See
jwtIdTokenServer()
for some common remarks. -
jwtRefreshTokenServer
Enable authentication using a JSON Web Token (JWT) that is a refresh token.A refresh token is used to obtain a new access token.
See
jwtIdTokenServer()
for some common remarks. -
jwtCustomTokenServer
Enable authentication using a JSON Web Token (JWT) that is neither an ID, access, nor refresh token.See
jwtIdTokenServer()
for some common remarks. -
none
No authentication, unsecured. Use only for development and testing purposes. -
getType
-
getTypeId
public long getTypeId()