PkiEnvironmentHooksImpl

The PKI Environment Hooks used for external calls during e2e enrollment flow. When communicating with the Identity Provider (IDP) and Wire server, CoreCrypto delegates to the client app by calling the relevant methods.

Client App CoreCrypto Acme IDP | | | | | X509CredentialAcquisition().finalize() | | |-------------------------->| | | | | GET acme/root.pem | | | |------------------------> | | | | 200 OK | | | |<------------------------ | | | authenticate() | | | |<--------------------------| | | | | Authentication flow | | | ----------------------------------------------------------------------------> | |<----------------------------------------------------------------------------- | | return Success PKiEnvironmentHooks.authenticate() | | |<--------------------------| | | | | (excluded several calls for brevity) | | return Success(Credential) X509CredentialAcquisition().finalize() | |<--------------------------| | |

Constructors

Link copied to clipboard
constructor(pointer: Pointer)
constructor(noPointer: NoPointer)

This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun authenticate(idp: String, keyAuth: String, acmeAud: String): String

Authenticate with the user's identity provider (IdP)

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open suspend override fun fetchBackendAccessToken(dpop: String): String

Fetch an access token to be used for the DPoP challenge (wire-dpop-01)

Link copied to clipboard
open suspend override fun getBackendNonce(): String

Get a nonce from the backend

Link copied to clipboard
open suspend override fun httpRequest(method: HttpMethod, url: String, headers: List<HttpHeader>, body: ByteArray): HttpResponse

Make an HTTP request Used for requests to ACME servers, CRL distributors etc.

Link copied to clipboard
fun uniffiClonePointer(): Pointer