Skip to content

Conversation

Copy link

Copilot AI commented Nov 27, 2025

Implements support for the enforce_handoff configuration property in IDV session creation, allowing relying parties to require handoff when it's enabled.

Changes

SdkConfig class (yoti_python_sdk/doc_scan/session/create/sdk_config.py):

  • Added enforce_handoff optional boolean parameter
  • Added with_enforce_handoff(flag) builder method
  • Included property in JSON serialization

Tests (yoti_python_sdk/tests/doc_scan/session/create/test_sdk_config.py):

  • Added test coverage for default behavior, true/false values, and JSON serialization
  • Verified interaction with allow_handoff property

Usage

sdk_config = (
    SdkConfigBuilder()
    .with_allows_camera_and_upload()
    .with_allow_handoff(True)
    .with_enforce_handoff(True)  # New property
    .with_success_url("https://example.com/success")
    .build()
)

Validation

The API validates that enforce_handoff requires allow_handoff=true. Invalid configurations return errors handled via existing DocScanException mechanism.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add enforce handoff configuration to SDK for IDV session Add enforce_handoff property to SDK session configuration Nov 27, 2025
Copilot AI requested a review from mehmet-yoti November 27, 2025 17:56
Copilot finished work on behalf of mehmet-yoti November 27, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants