When using Using this method, you don’t need to care about handling the analysis process with the Gini Bank API Library, you only need to provide your API credentials and a delegate to get the analysis results.
Code Block |
---|
|
let viewController = GiniCapture.viewController(withClient: client,
configuration: giniConfiguration,
resultsDelegate: resultsDelegate)
present(viewController, animated: true, completion:nil) |
If you want to use a transparent proxy with your own authentication, you can specify your own domain and add AlternativeTokenSource
protocol implementation:
Code Block |
---|
|
let viewController = GiniCapture.viewController(withClient: client,
configuration: configuration,
resultsDelegate: resultsDelegate,
api: .custom(domain: "api.custom.net",
tokenSource: MyAlternativeTokenSource)) |
The token you provide will be added as a bearer token to all api.custom.net
requests.
You can also specify a custom path segment if your proxy URL requires it:
Code Block |
---|
|
let viewController = GiniCapture.viewController(withClient: client,
configuration: configuration,
resultsDelegate: resultsDelegate,
api: .custom(domain: "api.custom.net",
path: "/custom/path",
tokenSource: MyAlternativeTokenSource |
Cfm card |
---|
layout | Simple |
---|
selectedUrl | https://gini.atlassian.net/wiki/spaces/ICSV/pages/11895105/Certificate+Pinning+DI |
---|
externalUrl | https://gini.atlassian.net/wiki/spaces/ICSV/pages/11895105/Certificate+Pinning+DI |
---|
color | #FFF6CE |
---|
filterSpace | false |
---|
destination | externalUrl |
---|
textColorPalette | Default |
---|
id | dfb18wsf8af |
---|
title | Certificate Pinning |
---|
body | How to use public key pinning? |
---|
textColor | #000000 |
---|
backgroundColorPalette | Default |
---|
|
Cfm card |
---|
layout | Simple |
---|
selectedUrl | https://gini.atlassian.net/wiki/spaces/ICSV/pages/11895147/Retrieval+of+Analyzed+Document |
---|
externalUrl | https://gini.atlassian.net/wiki/spaces/ICSV/pages/11895147/Retrieval+of+Analyzed+Document |
---|
color | #FFF6CE |
---|
filterSpace | false |
---|
destination | externalUrl |
---|
textColorPalette | Default |
---|
id | 98eg6vcryu |
---|
title | Retrieval of Analyzed Document |
---|
body | After the analysis, the Gini Bank API document is returned. |
---|
textColor | #000000 |
---|
backgroundColorPalette | Default |
---|
|
...