You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Documentation/source/Getting started.md
+18-7
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,25 @@ If you want to use a transparent proxy with your own authentication you can spec
22
22
23
23
```swift
24
24
let apiLib = GiniBankAPI.Builder(customApiDomain: "api.custom.net",
25
-
alternativeTokenSource: MyAlternativeTokenSource)
25
+
alternativeTokenSource: MyAlternativeTokenSource)
26
26
.build()
27
27
```
28
-
The token your provide will be added as a bearer token to all api.custom.net requests.
28
+
The token you provide will be added as a bearer token to all `api.custom.net` requests.
29
+
30
+
You can also specify a custom path segment, if your proxy url requires it:
31
+
32
+
```swift
33
+
let giniBankAPI = GiniBankAPI
34
+
.Builder(client: client,
35
+
api: .custom(domain: "api.custom.net",
36
+
path: "/custom/path",
37
+
tokenSource: MyAlternativeTokenSource))
38
+
.build()
39
+
```
29
40
30
41
## Public Key Pinning
31
42
32
-
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](https://github.com/datatheorem/TrustKit) for more information), the metadata information (the [Gini Bank API](https://developer.gini.net/gini-api/html/index.html) is used by default) as follows:
43
+
If you want to use _Certificate pinning_, then pass your public key pinning configuration (see [TrustKit repo](https://github.com/datatheorem/TrustKit) for more information) as follows:
33
44
34
45
```swift
35
46
let yourPublicPinningConfig = [
@@ -66,14 +77,12 @@ For customizing an API domain please, use the following snippet:
66
77
.Builder(client: Client(id: "your-id",
67
78
secret: "your-secret",
68
79
domain: "your-domain"),
69
-
api: .custom(domain: "custom-api.net"),
80
+
api: .custom(domain: "custom-api.net",
81
+
path:"/custom/path"),
70
82
pinningConfig: yourPublicPinningConfig)
71
83
.build()
72
84
```
73
85
74
-
> ⚠️ **Important**
75
-
> - The document metadata for the upload process is intended to be used for reporting.
76
-
77
86
## Extract Hash From gini.net
78
87
79
88
The current Gini Bank API public key SHA256 hash digest in Base64 encoding can be extracted with the following openssl commands:
> - The document metadata for the upload process is intended to be used for reporting. You can find out more about it in the [Gini Bank API](https://pay-api.gini.net/documentation) documentation.
129
140
130
141
Each page of a document needs to uploaded as a partial document. In addition documents consisting of one page also should be uploaded as a partial document.
0 commit comments