PrivMXConnection
The PrivMXConnection
protocol declares methods for managing connections to PrivMX Bridge with Swift types.
Do not conform to this protocol on your own.
Static Methods
setCertsPath(_:)
Sets path to .pem file with certificates needed for establishing connection. This certificates depends on your Bridge setup.
Params
path
String
Path to the .pem file
connect(as:to:on:setting:)
Connects with provided credentials to PrivMX Bridge.
Params
userPrivKey
String
User’s Private Key in WIF format
solutionID
String
Unique Solution Identifier defined at PrivMX Bridge
bridgeUrl
String
URL of PrivMX Bridge Instance
verificationOptions
privmx.endpoint.core.PKIVerificationOptions
URL of PrivMX Bridge Instance
Returns
any PrivMXConnection
·
new Connection object which can be used for initializing proper PrivMX Endpoint APIs
connectPublic(to:on:setting:)
Connects with public access to PrivMX Bridge. It is used mainly for public access to InboxApi
.
Params
solutionID
String
Unique Solution Identifier defined at PrivMX Bridge
bridgeUrl
String
verificationOptions
privmx.endpoint.core.PKIVerificationOptions
Returns
any PrivMXConnection
·
new Connection object which can be used for initializing PrivMX InboxApi
.
Methods
disconnect()
Disconnects current connection. Calling this function finished usage of PrivMXConnection object.
getConnectionId()
Returns current Connection ID.
Returns
Int64
·
Current Connection ID. Used for managing and identifying connections.
listContexts(basedOn:)
Lists Contexts to which the connected user has access.
Params
query
privmx.endpoint.core.PagingQuery
Object holding parameters of the query
Returns
privmx.ContextList
·
Structure containing all Contexts user has access to.
setUserVerifier(_:)
Sets user’s custom verification callback. Use this to set up verification with a PKI server.
Params
verifierImplementation
privmx.VerificationImplementation
Callback that will be called for each verification request by the C++ library. It takes a C++ std.vector
of privmx.endpoint.core.VerificationRequest
objects, exposed to swift as privmx.VerificationRequestVector
and returns a std.vector
of bool
s corresponding to the verification results.
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.
PrivMX Endpoint Swift v2.3