PrivMX DOCS
API Reference/Endpoint/Core

Connection

'Connection' represents and manages the current connection between the Endpoint and the Bridge server.

Static Methods

connect

Connects to the PrivMX Bridge server.

Params

userPrivKey

const std::string &

user's private key

solutionId

const std::string &

ID of the Solution

bridgeUrl

const std::string &

Bridge Server URL

verificationOptions

const PKIVerificationOptions &

PrivMX Bridge server instance verification options using a PKI server

static Connection connect(const std::string &userPrivKey
const std::string &solutionId
const std::string &bridgeUrl
const PKIVerificationOptions &verificationOptions=PKIVerificationOptions())

Returns

Connection · Connection object

connectPublic

Connects to the PrivMX Bridge Server as a guest user.

Params

solutionId

const std::string &

ID of the Solution

bridgeUrl

const std::string &

Bridge Server URL

verificationOptions

const PKIVerificationOptions &

PrivMX Bridge server instance verification options using a PKI server

static Connection connectPublic(const std::string &solutionId
const std::string &bridgeUrl
const PKIVerificationOptions &verificationOptions=PKIVerificationOptions())

Returns

Connection · Connection object

Methods

getConnectionId

Gets the ID of the current connection.

int64_t getConnectionId()

Returns

int64_t · ID of the connection

listContexts

Gets a list of Contexts available for the user.

Params

pagingQuery

const PagingQuery &

struct with list query parameters

PagingList< Context > listContexts(
const PagingQuery &pagingQuery
)

Returns

PagingList<Context> · struct containing a list of Contexts

getContextUsers

Gets a list of users of given context.

Params

contextId

const std::string &

ID of the context

std::vector< UserInfo > getContextUsers(
const std::string &contextId
)

Returns

std::vector<UserInfo> · vector containing a list of users Info

disconnect

Disconnects from the PrivMX Bridge server.

void disconnect()

setUserVerifier

Sets user's custom verification callback.

The feature allows the developer to set up a callback for user verification. A developer can implement an interface and pass the implementation to the function. Each time data is read from the container, a callback will be triggered, allowing the developer to validate the sender in an external service, e.g. Developer's Application Server or PKI Server.

Params

verifier

std::shared_ptr<UserVerifierInterface>

an implementation of the UserVerifierInterface

void setUserVerifier(
std::shared_ptr<UserVerifierInterface> verifier
)

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.

This is documentation for PrivMX v2.3, which is no longer actively maintained.

For up-to-date documentation, go to latest here