Skip to content

Conversation

mehmet-yoti
Copy link
Contributor

No description provided.

Copy link

@saurabh-yoti saurabh-yoti left a comment

Choose a reason for hiding this comment

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

To avoid the need for a JSON session config while creating Share v2 session, we need to implement additional builders for Share v2 - Policy, Extensions, Constraints, Wanted.

This is in line with Other SDKs that have added Digital Identity (Share v2) support. Please refer to them.

</main>

<script src="https://www.yoti.com/share/client/"></script>
<script src="https://www.public.stg1.dmz.yoti.com/share/client"></script>

Choose a reason for hiding this comment

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

Please change back to the Prod URL.

</section>
</main>
<script src="https://www.yoti.com/share/client/"></script>
<script src="https://connect.public.stg1.dmz.yoti.com/share/client/"></script>

Choose a reason for hiding this comment

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

Please change back to the Prod URL.



class DynamicScenarioBuilder(object):
print("Hello, World!")

Choose a reason for hiding this comment

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

Remove the print statement.


if profile_attributes:
for field in profile_attributes:
# print("field %s" % field)

Choose a reason for hiding this comment

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

Remove the commented print statement.

Choose a reason for hiding this comment

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

Please remove this key.

"subject_id": "some_subject_id_string"
}, # Optional reference to a user ID
"notification": {
"url": "https://webhook.site/818dc66b-e18b-4767-92c5-47c7af21629c",

Choose a reason for hiding this comment

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

Might be better to change URL to https://example.com/webhook-url.

domId: 'webshare-target',
sdkId: '99525f08-afbb-4420-98b9-0717309f7fed',
skinId: 'yoti',
flow: 'INLINE_QR',

Choose a reason for hiding this comment

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

INLINE_QR is a legacy value. Please change that to INSTANT.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a new Digital Identity Share v2 functionality for the Yoti Python SDK, adding support for creating and managing share sessions, QR codes, and receipts with encryption handling.

  • Adds new digital identity client with methods for session and QR code management
  • Implements receipt decryption and content parsing functionality
  • Updates activity details to use new identifier properties

Reviewed Changes

Copilot reviewed 44 out of 66 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
yoti_python_sdk/digital_identity/ New module containing client and result classes for share v2 functionality
yoti_python_sdk/tests/digital_identity/ Test files for the new digital identity functionality
yoti_python_sdk/tests/test_client.py Updated to use new user_identifier and receipt_identifier properties
examples/digitalidentity/ Complete Flask example application demonstrating the new functionality
setup.py Updated protobuf and coverage versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.



class DynamicScenarioBuilder(object):
print("Hello, World!")
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

Debug print statement should be removed from production code as it will execute when the class is defined.

Suggested change
print("Hello, World!")

Copilot uses AI. Check for mistakes.


if profile_attributes:
for field in profile_attributes:
# print("field %s" % field)
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

Commented-out debug print statement should be removed from production code.

Suggested change
# print("field %s" % field)

Copilot uses AI. Check for mistakes.

Comment on lines 105 to 106
assert len(result.id_document_text_data_checks) == 1
assert isinstance(result.id_document_text_data_checks[0], TextDataCheckResponse)
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

Duplicate assertion lines 105-106 should be removed as they are identical to lines 102-103.

Suggested change
assert len(result.id_document_text_data_checks) == 1
assert isinstance(result.id_document_text_data_checks[0], TextDataCheckResponse)

Copilot uses AI. Check for mistakes.

Comment on lines +101 to +105
@property
@deprecated
def user_id(self):
return self.__remember_me_id

Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

Duplicate property definition for 'user_id' will cause the second definition to override the first.

Suggested change
@property
@deprecated
def user_id(self):
return self.__remember_me_id

Copilot uses AI. Check for mistakes.

@user_id.setter
@deprecated
def user_id(self, value):
def user_identifier(self, value):
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

The setter is named 'user_identifier' but should be 'user_id' to match the property it's setting.

Suggested change
def user_identifier(self, value):
def user_id(self, value):

Copilot uses AI. Check for mistakes.

<table>
{% for key, value in attribute.value.items() %}
<tr>
<td>bb{{ key }}<br/>
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

The 'bb' prefix appears to be debugging text that should be removed from the template.

Suggested change
<td>bb{{ key }}<br/>
<td>{{ key }}<br/>

Copilot uses AI. Check for mistakes.

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