IO Wallet SDK
    Preparing search index...

    Callback context provides the callbacks that are required for the openid4vc library

    interface CallbackContext {
        clientAuthentication: ClientAuthenticationCallback;
        decryptJwe: DecryptJweCallback;
        encryptJwe: EncryptJweCallback;
        fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
        generateRandom: GenerateRandomCallback;
        getX509CertificateMetadata?: (
            certificate: string,
        ) => { sanDnsNames: string[]; sanUriNames: string[] };
        hash: HashCallback;
        signJwt: SignJwtCallback;
        verifyJwt: VerifyJwtCallback;
    }
    Index

    Properties

    clientAuthentication: ClientAuthenticationCallback

    Extend a request to the authorization server with client authentication parameters. If you're not using client authentication, you can set this to clientAuthenticationNone()

    There are three default client authentication methods provided:

    • clientAuthenticationClientSecretPost
    • clientAuthenticationClientSecretBasic
    • clientAuthenticationClientAttestationJwt
    • clientAuthenticationNone
    • clientAuthenticationAnonymous

    A custom implementation can be made for other methods, or allowing complex scenarios where multiple authorization servers are supported.

    decryptJwe: DecryptJweCallback

    Decrypt jwe callback for decrypting of Json Web Encryptions

    encryptJwe: EncryptJweCallback

    Encrypt jwt callback for encrypting of Json Web Encryptions

    fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

    Custom fetch implementation to use

    Type Declaration

      • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
      • Parameters

        • input: RequestInfo | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

    generateRandom: GenerateRandomCallback

    Generate random callback to generate random bytes. Used for e.g. the 'jti' value in a dpop jwt, and 'code_verifier' in pkce.

    getX509CertificateMetadata?: (
        certificate: string,
    ) => { sanDnsNames: string[]; sanUriNames: string[] }

    Get the DNS names and URI names from a X.509 certificate

    Hash callback used for e.g. dpop and pkce

    Sign jwt callback for signing of Json Web Tokens

    Verify jwt callback for verification of Json Web Tokens