ObjectBox C and C++ API 4.3.0
 
Loading...
Searching...
No Matches
obx::SyncCredentials Class Reference

Credentials for logging into a Sync Server that are passed to SyncClient. Typically created using a factory method, e.g. SyncCredentials::none() or SyncCredentials::jwtIdToken(...). More...

#include <objectbox-sync.hpp>

Public Member Functions

 SyncCredentials (OBXSyncCredentialsType type, std::vector< uint8_t > &&data)
 
 SyncCredentials (OBXSyncCredentialsType type, const std::string &data)
 
 SyncCredentials (OBXSyncCredentialsType type, const std::string &username, const std::string &password)
 
const uint8_t * data () const
 Only available if initialized with byte data (not username/password).
 
size_t dataSize () const
 Only available if initialized with byte data (not username/password).
 

Static Public Member Functions

static SyncCredentials none ()
 
static SyncCredentials sharedSecret (std::vector< uint8_t > &&data)
 
static SyncCredentials sharedSecret (const std::string &str)
 
static SyncCredentials googleAuth (const std::string &str)
 
static SyncCredentials obxAdminUser (const std::string &username, const std::string &password)
 
static SyncCredentials userPassword (const std::string &username, const std::string &password)
 
static SyncCredentials jwtIdToken (const std::string &token)
 
static SyncCredentials jwtAccessToken (const std::string &token)
 
static SyncCredentials jwtRefreshToken (const std::string &token)
 
static SyncCredentials jwtCustomToken (const std::string &token)
 

Detailed Description

Credentials for logging into a Sync Server that are passed to SyncClient. Typically created using a factory method, e.g. SyncCredentials::none() or SyncCredentials::jwtIdToken(...).

Constructor & Destructor Documentation

◆ SyncCredentials() [1/3]

obx::SyncCredentials::SyncCredentials ( OBXSyncCredentialsType  type,
std::vector< uint8_t > &&  data 
)
inline

◆ SyncCredentials() [2/3]

obx::SyncCredentials::SyncCredentials ( OBXSyncCredentialsType  type,
const std::string &  data 
)
inline

◆ SyncCredentials() [3/3]

obx::SyncCredentials::SyncCredentials ( OBXSyncCredentialsType  type,
const std::string &  username,
const std::string &  password 
)
inline

Member Function Documentation

◆ data()

const uint8_t * obx::SyncCredentials::data ( ) const
inline

Only available if initialized with byte data (not username/password).

◆ dataSize()

size_t obx::SyncCredentials::dataSize ( ) const
inline

Only available if initialized with byte data (not username/password).

◆ googleAuth()

static SyncCredentials obx::SyncCredentials::googleAuth ( const std::string &  str)
inlinestatic

◆ jwtAccessToken()

static SyncCredentials obx::SyncCredentials::jwtAccessToken ( const std::string &  token)
inlinestatic

◆ jwtCustomToken()

static SyncCredentials obx::SyncCredentials::jwtCustomToken ( const std::string &  token)
inlinestatic

◆ jwtIdToken()

static SyncCredentials obx::SyncCredentials::jwtIdToken ( const std::string &  token)
inlinestatic

◆ jwtRefreshToken()

static SyncCredentials obx::SyncCredentials::jwtRefreshToken ( const std::string &  token)
inlinestatic

◆ none()

static SyncCredentials obx::SyncCredentials::none ( )
inlinestatic

◆ obxAdminUser()

static SyncCredentials obx::SyncCredentials::obxAdminUser ( const std::string &  username,
const std::string &  password 
)
inlinestatic

◆ sharedSecret() [1/2]

static SyncCredentials obx::SyncCredentials::sharedSecret ( const std::string &  str)
inlinestatic

◆ sharedSecret() [2/2]

static SyncCredentials obx::SyncCredentials::sharedSecret ( std::vector< uint8_t > &&  data)
inlinestatic

◆ userPassword()

static SyncCredentials obx::SyncCredentials::userPassword ( const std::string &  username,
const std::string &  password 
)
inlinestatic