Skip to content

Commit

Permalink
doc: remove deprecated instructions and fix evidence link (#52)
Browse files Browse the repository at this point in the history
* Remove deprecated account creation instructions
* Remove instructions for deprecated region selection
* Update evidence section link
  • Loading branch information
figueredo authored Jul 24, 2024
1 parent 6b4f828 commit 82663a0
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ object of `IncogniaClientConfig` that contains the following parameters:
| `ClientSecret` | Your client secret | **Yes** | - |
| `Timeout` | Request timeout | **No** | 10 seconds |
| `HTTPClient` | Custom HTTP client | **No** | `http.Client` |
| `Region` (deprecated) | Incognia's service region, either `BR` or `US` | **No** | `US` |

For instance, if you need a client for the US region:
For instance, if you need the default client:

```go
client, err := incognia.New(&incognia.IncogniaClientConfig{
Expand All @@ -37,22 +36,20 @@ if err != nil {
}
```

or if you need a client for the BR region that uses a specific timeout:
or if you need a client that uses a specific timeout:

```go
// to use the BR region
client, err := incognia.New(&incognia.IncogniaClientConfig{
ClientID: "your-client-id",
ClientSecret: "your-client-secret",
Region: incognia.BR,
Timeout: time.Second * 2,
})
if err != nil {
log.Fatal("could not initialize Incognia client")
}
```

to customize the HTTP round tripper:
or if you need a custom HTTP client:

```go
transport := http.DefaultTransport.(*http.Transport).Clone()
Expand All @@ -68,7 +65,6 @@ httpClient := &http.Client{
client, err := incognia.New(&incognia.IncogniaClientConfig{
ClientID: "your-client-id",
ClientSecret: "your-client-secret",
Region: incognia.BR,
Timeout: time.Second * 2,
HTTPClient: httpClient,
})
Expand Down Expand Up @@ -341,29 +337,31 @@ if err != nil {
fmt.Println(deviceModel)
```
You can also access specific evidences using their full path. For example, to get risk_window_remaining evidence from the following response:
You can also access specific evidences using their full path. For example, to get `location_permission_enabled` evidence from the following response:
```json
{
...
"account_integrity": {
"risk_window_remaining": 12812817373
"evidence": {
"location_services": {
"location_permission_enabled": true
}
}
}
```
call any type of `GetEvidence` method using the evidence's full path:
```go
riskWindowRemaining, err := assessment.Evidence.GetEvidenceAsInt64("account_integrity.risk_window_remaining")
var locationPermissionEnabled bool
err := assessment.Evidence.GetEvidence("location_services.location_permission_enabled", &locationPermissionEnabled)
if err != nil {
return err
}

fmt.Println(riskWindowRemaining)
fmt.Println(locationPermissionEnabled)
```
You can find all available evidence [here](https://docs.incognia.com/apis/understanding-assessment-evidence#risk-assessment-evidence).
You can find all available evidence [here](https://developer.incognia.com/docs/apis/v2/understanding-assessment-evidence).
## How to Contribute
Expand All @@ -377,12 +375,6 @@ Incognia is a location identity platform for mobile apps that enables:
- Frictionless authentication
- Real-time transaction verification
## Create a Free Incognia Account
1. Go to [Incognia](https://www.incognia.com/) and click on "Get Started"
2. Fill the contact form
3. Once we contact you, you will be ready to integrate [Incognia SDK](https://docs.incognia.com/sdk/getting-started) and use [Incognia APIs](https://dash.incognia.com/api-reference)
## License
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

0 comments on commit 82663a0

Please sign in to comment.