PkiEnvironmentHooks

Callbacks for external calls made by CoreCrypto during X509 credential acquisition.

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() | |<--------------------------| | |

Inheritors

Types

Link copied to clipboard
object Companion

Functions

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

Authenticate with the user's identity provider (IdP)

Link copied to clipboard
abstract suspend fun fetchBackendAccessToken(dpop: String): String

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

Link copied to clipboard
abstract suspend fun getBackendNonce(): String

Get a nonce from the backend.

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

Make an HTTP request.