Class ExternalIdAttestationRequestorClient

%%{init:{"theme":"dark"}}%% sequenceDiagram actor C as Client participant H as Holochain C->>H: ExternalId Attestation Request (SendExternalIdAttestationRequestPayload) H-->>C: received C->>C: Wait for signal H->>C: Signal attestation ( ExternalIdAttested or ExternalIdRejected)
%%{init:{"theme":"default"}}%% sequenceDiagram actor C as Client participant H as Holochain C->>H: ExternalId Attestation Request (SendExternalIdAttestationRequestPayload) H-->>C: received C->>C: Wait for signal H->>C: Signal attestation ( ExternalIdAttested or ExternalIdRejected)
sequenceDiagram
 actor C as Client
 participant H as Holochain
 C->>H: ExternalId Attestation Request (SendExternalIdAttestationRequestPayload)
 H-->>C: received
 C->>C: Wait for signal
 H->>C: Signal attestation ( ExternalIdAttested or ExternalIdRejected)

This client is used for obtaining ExternalIdAttestations from the holoom network's authority agent. It should be invoked after receiving an authorization code (by callback) from the identity provider in question.

Currently the only PKCE Authorization Code flow is supported.

Constructors

Properties

appClient: AppClient
attestationProvider: Uint8Array
resolvers: {
    [requestId: string]: RequestResolver;
} = {}
usernameRegistryCoordinator: UsernameRegistryCoordinator

Methods

  • Submits sign-in flow related secrets to the holoom network's authority agent, which in turn makes use of them as evidence that the user controls the corresponding external web2 account. The authority subsequently creates an ExternalIdAttestation entry to attest this is so.

    Parameters

    • codeVerifier: string

      The pre-image to the PKCE challenge that was submitted to the identity provider's sign-in flow

    • code: string

      The secret received from the identity provider on sign-in callback. The holoom network's authority agent exchanges this for an access token.

    Returns Promise<Record>

    The ExternalIdAttestation entry created by the authority