SyncCredentials
public class SyncCredentials
Credentials for authenticating the client when connecting to a sync server/peer.
E.g. use SyncCredentials.makeSharedSecret(secret).
-
No authentication, insecure. Use only for development and testing purposes.
Declaration
Swift
public static func makeNone() -> SyncCredentials -
Authenticate with a pre-shared secret.
Declaration
Swift
public static func makeSharedSecret(_ data: Data) -> SyncCredentials -
Authenticate with a pre-shared key. The given string will be UTF-8 encoded.
Declaration
Swift
public static func makeSharedSecret(_ string: String) -> SyncCredentials -
Authenticate with an ObjectBox Admin user(name) and a password.
Declaration
Swift
public static func makeObxAdminUser(_ username: String, _ password: String) -> SyncCredentials -
Authenticate with a generic username and a password. The server configuration determines to which auth providers this goes to.
Declaration
Swift
public static func makeUsernamePassword(_ username: String, _ password: String) -> SyncCredentials -
Authenticate with a JWT ID token. The given string will be UTF-8 encoded.
Declaration
Swift
public static func makeJwtIdToken(_ jwtIdToken: String) -> SyncCredentials -
Authenticate with a JWT access token. The given string will be UTF-8 encoded.
Declaration
Swift
public static func makeJwtAccessToken(_ jwtAccessToken: String) -> SyncCredentials -
Authenticate with a JWT refresh token. The given string will be UTF-8 encoded.
Declaration
Swift
public static func makeJwtRefreshToken(_ jwtRefreshToken: String) -> SyncCredentials -
Authenticate with a JWT custom token. The given string will be UTF-8 encoded.
Declaration
Swift
public static func makeJwtCustomToken(_ jwtCustomToken: String) -> SyncCredentials
View on GitHub
Install in Dash
SyncCredentials Class Reference