Builder

class Builder(context: Context)

Builder used to construct SudoUserClient.

Constructors

Link copied to clipboard
constructor(context: Context)

Functions

Link copied to clipboard

Constructs and returns an SudoUserClient.

Link copied to clipboard
fun setApiClient(apiClient: GraphQLClient): <Error class: unknown class>

Provide an GraphQLClient for the SudoUserClient. If this is not supplied, a default GraphQLClient will be used. This is mainly used for unit testing.

Link copied to clipboard
fun setAuthUI(authUI: AuthUI): <Error class: unknown class>

Provide a custom auth UI. This is mainly used for unit testing (optional).

Link copied to clipboard
fun setConfig(config: JSONObject): <Error class: unknown class>

Provide the configuration parameters.

Link copied to clipboard
fun setCredentialsProvider(credentialsProvider: CognitoCredentialsProvider): <Error class: unknown class>

Provide a custom credentials provider. This is mainly used for unit testing (optional). If a value is not provided, a default implementation will be used.

Link copied to clipboard
fun setDatabaseName(databaseName: String): <Error class: unknown class>

Provide the database name to use for exportable key store database.

Link copied to clipboard
fun setIdentityProvider(identityProvider: IdentityProvider): <Error class: unknown class>

Provide a custom identity provider. This is mainly used for unit testing (optional).

Link copied to clipboard
fun setIdGenerator(idGenerator: IdGenerator): <Error class: unknown class>

Provide a custom ID generator. This is mainly used for unit testing. If a value is not provided, a default implementation will be used.

Link copied to clipboard
fun setKeyManager(keyManager: KeyManagerInterface): <Error class: unknown class>

Provide custom KeyManagerInterface implementation. This is mainly used for unit testing (optional).

Link copied to clipboard
fun setLogger(logger: Logger): <Error class: unknown class>

Provide the implementation of the Logger used for logging. If a value is not supplied a default implementation will be used.

Link copied to clipboard
fun setNamespace(namespace: String): <Error class: unknown class>

Provide the namespace to use for internal data and cryptographic keys. This should be unique per client per app to avoid name conflicts between multiple clients. If a value is not supplied a default value will be used.