Skip to end of banner
Go to start of banner

Default Implementation

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Gini Bank API Initialization

If you want to use a transparent proxy with your own authentication, you can specify your own domain and add AlternativeTokenSource protocol implementation:

 let apiLib =  GiniBankAPI.Builder(customApiDomain: "api.custom.net",
                                 alternativeTokenSource: MyAlternativeTokenSource)
                                 .build()

The token you provide will be added as a bearer token to all api.custom.net requests.

Optionally, if you want to use Certificate pinning, provide metadata for the upload process. You can pass both your public key pinning configuration (see TrustKit repo for more information)

    let giniApiLib = GiniBankAPI
        .Builder(client: Client(id: "your-id",
                                secret: "your-secret",
                                domain: "your-domain"),
                 api: .default,
                 pinningConfig: yourPublicPinningConfig)
        .build()

The document metadata for the upload process is intended to be used for reporting.



  • No labels