Skip to content

SDK-2751: Add to Python SDK enforce_handoff - #470

Merged
mehmet-yoti merged 1 commit into
developmentfrom
SDK-2751-python-add-enforce-handoff-to-sd-ks-for-idv-create-session
Nov 18, 2026
Merged

mehmet-yoti merged 1 commit into
developmentfrom
SDK-2751-python-add-enforce-handoff-to-sd-ks-for-idv-create-session

Conversation

@mehmet-yoti

Copy link
Copy Markdown
Contributor

Summary

Adds a new enforce_handoff configuration property to sdk_config for IDV Create Session, mirroring the existing allow_handoff property. See DOCS-3523 for details.

"sdk_config": {
    ...
    "enforce_handoff": true,
    ...
}

enforce_handoff cannot be enabled when allow_handoff is false. This is not validated client-side — the SDK relies on the IDV API's existing validation and simply surfaces whatever error the API returns (via the existing DocScanException, which already parses code/message/errors from the API response).

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is additive, follows existing serialization patterns (remove_null_values), and includes targeted unit tests validating expected behavior.

Pull request overview

Adds support for the new sdk_config.enforce_handoff field in Doc Scan “Create Session”, aligning the Python SDK’s session creation payload and object model with the IDV API capabilities.

Changes:

  • Extended SdkConfig/SdkConfigBuilder to accept, expose, and serialize enforce_handoff.
  • Added unit tests covering default behavior and JSON serialization/omission semantics for enforce_handoff.
File summaries
File Description
yoti_python_sdk/doc_scan/session/create/sdk_config.py Adds enforce_handoff attribute, builder method, accessor, and JSON serialization (with null removal).
yoti_python_sdk/tests/doc_scan/session/create/test_sdk_config.py Adds test coverage for enforce_handoff build behavior and JSON presence/absence.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mehmet-yoti mehmet-yoti changed the title SDK-2751: Add to Python SDK IDV Create Session SDK-2751: Add to Python SDK enforce_handoff Sep 2, 2026
@nikhilPank
nikhilPank self-requested a review September 7, 2026 17:02

@nikhilPank nikhilPank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine

@mehmet-yoti
mehmet-yoti merged commit 3fa25c4 into development Nov 18, 2026
14 checks passed
@mehmet-yoti mehmet-yoti mentioned this pull request Nov 18, 2026
mehmet-yoti added a commit that referenced this pull request Nov 25, 2026
* SDK-2488: Python - Support dark mode in IDV SDK - python (#466)

* Add dark_mode and primary_colour_dark_mode to SdkConfig (SDK-2488)

Extends SdkConfig and SdkConfigBuilder with two new optional fields:
- dark_mode (with_dark_mode, with_dark_mode_on/off/auto convenience methods)
- primary_colour_dark_mode (with_primary_colour_dark_mode)

Both fields are omitted from the JSON payload when not set (None).
* feat(SDK-2488): Python - Support dark mode in IDV SDK [python]
* SDK-2751: Add  to Python SDK IDV Create Session (#470)
* SDK-2530-python-create-helper-methods-for-the-idv-sdk (#468)
* SDK-2773-python-support-central-auth-tokens (#467)
* SDK-2773-python-support-central-auth-tokens
* fix(SDK-2773): add jti claim to auth JWT and address review comments
- Add jti (UUID v4) claim to the client assertion JWT, with an optional
  with_jwt_id_supplier() builder override (parity with PHP/Java)
- Add a configurable timeout to the auth token request (default 30s)
- Don't append a trailing '?' to URLs when there are no query params
- Abstract AuthStrategy methods raise NotImplementedError
- Fix 'compatibility' typo and update DocScanClient docstring

* Merge pull request #471 from getyoti/websdk-auto/SDK-2869-python-support-fetching-session-pdf-in-idv
SDK-2869: Python - Support fetching session PDF in IDV - python
* Sdk 2802 python remove the api for aml check in connect (#469)
* SDK-2802-python-remove-the-api-for-aml-check-in-connect
* ci: pin runners to ubuntu-24.04 so Python 3.9 is still available
ubuntu-latest moved to Ubuntu 26.04, which has no Python 3.9 build in
actions/python-versions. The SDK still supports 3.9 (python_requires>=3.9).
* feat(SDK-2827): Python - Support company_profile for IDV [python] (#472)
* Bump version to 2.15.0
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.

3 participants