Skip to content

Commit

Permalink
Merge pull request #286 from getyoti/IN5631
Browse files Browse the repository at this point in the history
SDK-2386: Update IDV example project defaults
  • Loading branch information
nikhilPank authored Nov 10, 2023
2 parents b7ffc8d + 3437a1d commit 6457d5c
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import "github.com/getyoti/yoti-go-sdk/v3"
```
or add the following line to your go.mod file (check https://github.com/getyoti/yoti-go-sdk/releases for the latest version)
```
require github.com/getyoti/yoti-go-sdk/v3 v3.11.0
```

Expand Down
Binary file removed _examples/idv/idv.exe
Binary file not shown.
20 changes: 8 additions & 12 deletions _examples/idv/models.sessionspec.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
func buildSessionSpec() (sessionSpec *create.SessionSpecification, err error) {
var faceMatchCheck *check.RequestedFaceMatchCheck
faceMatchCheck, err = check.NewRequestedFaceMatchCheckBuilder().
WithManualCheckAlways().
WithManualCheckFallback().
Build()
if err != nil {
return nil, err
Expand All @@ -28,8 +28,8 @@ func buildSessionSpec() (sessionSpec *create.SessionSpecification, err error) {

var livenessCheck *check.RequestedLivenessCheck
livenessCheck, err = check.NewRequestedLivenessCheckBuilder().
ForZoomLiveness().
WithMaxRetries(5).
ForStaticLiveness().
WithMaxRetries(3).
Build()
if err != nil {
return nil, err
Expand Down Expand Up @@ -71,7 +71,7 @@ func buildSessionSpec() (sessionSpec *create.SessionSpecification, err error) {

var textExtractionTask *task.RequestedTextExtractionTask
textExtractionTask, err = task.NewRequestedTextExtractionTaskBuilder().
WithManualCheckAlways().
WithManualCheckFallback().
WithExpandedDocumentFields(true).
Build()
if err != nil {
Expand All @@ -80,7 +80,7 @@ func buildSessionSpec() (sessionSpec *create.SessionSpecification, err error) {

var supplementaryDocTextExtractionTask *task.RequestedSupplementaryDocTextExtractionTask
supplementaryDocTextExtractionTask, err = task.NewRequestedSupplementaryDocTextExtractionTaskBuilder().
WithManualCheckAlways().
WithManualCheckFallback().
Build()
if err != nil {
return nil, err
Expand Down Expand Up @@ -158,7 +158,7 @@ func buildSessionSpec() (sessionSpec *create.SessionSpecification, err error) {

sessionSpec, err = create.NewSessionSpecificationBuilder().
WithClientSessionTokenTTL(600).
WithResourcesTTL(90000).
WithResourcesTTL(86400).
WithUserTrackingID("some-tracking-id").
WithRequestedCheck(faceMatchCheck).
WithRequestedCheck(documentAuthenticityCheck).
Expand All @@ -180,10 +180,6 @@ func buildSessionSpec() (sessionSpec *create.SessionSpecification, err error) {
return nil, err
}

if err != nil {
return nil, err
}

return sessionSpec, nil
}

Expand Down Expand Up @@ -224,8 +220,8 @@ func buildDBSSessionSpec() (sessionSpec *create.SessionSpecification, err error)
}`)

sessionSpec, err = create.NewSessionSpecificationBuilder().
WithClientSessionTokenTTL(6000).
WithResourcesTTL(900000).
WithClientSessionTokenTTL(600).
WithResourcesTTL(86400).
WithUserTrackingID("some-tracking-id").
WithSDKConfig(sdkConfig).
WithIdentityProfileRequirements(identityProfile).
Expand Down
35 changes: 35 additions & 0 deletions _examples/idv/templates/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,41 @@ <h5>Media</h5>
</div>
{{ end }}

{{ if $doc.ExpandedDocumentFields }}
<div class="card">
<div class="card-header" id="document-fields-{{ $key }}">
<h4 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse"
data-target="#collapse-document-fields-{{ $key }}"
aria-expanded="true"
aria-controls="collapse-document-fields-{{ $key }}">
Expanded Document Fields
</button>
</h4>
</div>
<div id="collapse-document-fields-{{ $key }}" class="collapse"
aria-labelledby="document-fields-{{ $key }}">
<div class="card-body">
{{ if $doc.ExpandedDocumentFields.Media }}
<h5>Media</h5>
<table class="table table-striped table-light">
<tbody>
<tr>
<td>ID</td>
<td>
<a href="/media?mediaId={{ $doc.ExpandedDocumentFields.Media.ID }}">
{{ $doc.ExpandedDocumentFields.Media.ID }}
</a>
</td>
</tr>
</tbody>
</table>
{{ end }}
</div>
</div>
</div>
{{ end }}

{{ if $doc.DocumentIDPhoto }}
<div class="card">
<div class="card-header" id="document-id-photo-{{ $key }}">
Expand Down

0 comments on commit 6457d5c

Please sign in to comment.