Package-level declarations

Types

Link copied to clipboard

SimpleCipher implementation for AES/GCM with 128/192/256 bit keys.

Link copied to clipboard
class HttpHandler(dispatcher: RpcDispatcher, rpcPoll: RpcPoll) : HttpTransport

Implements HttpTransport based on the given RpcDispatcher and RpcPoll. Useful to route incoming HTTP requests on the server.

Link copied to clipboard
Link copied to clipboard

SimpleCipher that does not encrypt or decrypt messages.

Link copied to clipboard
class RpcAuthContext(clientId: String, sessionId: String, nextNonce: ByteString? = null) : CoroutineContext.Element

An object added to the current coroutine context based on the successful processing of RPC call authorization.

Link copied to clipboard

RPC authorization error codes. See RpcAuthException.

Link copied to clipboard
class RpcAuthException(val message: String?, val rpcAuthError: RpcAuthError) : RuntimeException

RPC authorization failure.

Link copied to clipboard

RPC call authorization.

Link copied to clipboard
class RpcAuthInspectorAssertion(val timeout: Duration = 10.minutes, val nonceChecker: suspend (clientId: String, nonce: ByteString, expiration: Instant) -> RpcAuthInspectorAssertion.NonceAndSession = Companion::checkNonce, val clientLookup: suspend (clientId: String) -> DeviceAttestation? = Companion::getClientDeviceAttestation) : RpcAuthInspector

Implementation of RpcAuthInspector that requires each RPC call to be authorized with AssertionRpcAuth object signed by a secure device key (see DeviceAssertion). Authorization is only trusted by timeout duration. Nonce AssertionRpcAuth.nonce uniqueness is checked by nonceChecker and DeviceAttestation that is used to validate AssertionRpcAuth is looked up by the client id using clientLookup.

Link copied to clipboard
interface RpcAuthIssuer

Interface to issue and add authentication data to RPC messages.

Link copied to clipboard
class RpcAuthIssuerAssertion(clientId: String, secureArea: SecureArea, deviceAttestationId: String) : RpcAuthIssuer

RpcAuthIssuer implementation that authorizes each call with using AssertionRpcAuth object signed by a secure device key. In addition to payload field in in authorization Cbor map it adds an assertion field that holds DeviceAssertion.

Link copied to clipboard
class RpcAuthNonceException(val nonce: ByteString) : RuntimeException

RPC authorization failure with nonce for retry.

Link copied to clipboard
interface RpcDispatcher

Generated flow interface implementations use this interface to dispatch method calls to the flow implementations, potentially across the network.

Link copied to clipboard
class RpcDispatcherAuth(val base: RpcDispatcher, rpcAuthIssuer: RpcAuthIssuer) : RpcDispatcher

RpcDispatcher implementation that dispatches RPC call to a base dispatcher after adding RPC method authorization to it.

Link copied to clipboard
class RpcDispatcherHttp(transport: HttpTransport, val exceptionMap: RpcExceptionMap) : RpcDispatcher

RpcDispatcher implementation that dispatches flow method calls through HTTP.

Link copied to clipboard

RpcDispatcher implementation that dispatches RPC method calls to to backend ("state") object calls. This is for use in server environment and for testing.

Link copied to clipboard

An object that serializes and deserializes exceptions marked with FlowException annotations. All exceptions must be registered using generated ExceptionName.register method both on the client and on the server.

Link copied to clipboard

A low-level interface to convey notifications to registered clients.

Link copied to clipboard

Implementation for RpcNotifications that can also serve as RpcNotifier for testing/developing in local environment.

Link copied to clipboard

Implementation for RpcNotifications that also implements RpcPoll interface to handle long poll method for notification propagation.

Link copied to clipboard
interface RpcNotifier

A low-level interface to register and unregister for notifications on the client.

Link copied to clipboard

RpcNotifier implementation based on RpcPoll interface.

Link copied to clipboard
interface RpcPoll

An interface to represent a long poll.

Link copied to clipboard
class RpcPollHttp(transport: HttpTransport) : RpcPoll

RpcPoll implementation that works through HTTP.

Link copied to clipboard

Constants to determine the result kind in Cbor serialization of the method call response.

Link copied to clipboard
interface SimpleCipher

Interface that is used by the server to (1) protect its data from the client and (2) serve as authentication mechanism (as the client should not be able to generate valid encrypted data). Thus it is important that encryption algorithm provides both data authenticity and confidentiality.