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 is 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.