Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#299-feature/presentation submission dynamic handler #314

Draft
wants to merge 11 commits into
base: refac
Choose a base branch
from

Conversation

LadyCodesItBetter
Copy link
Collaborator

This PR introduces enhancements to the PresentationSubmission class to improve error handling and dynamic handler initialization based on descriptor_map.

Key points:

  • handlers are dynamically created for each descriptor_map entry based on the format key.
  • handlers attribute contains a dictionary where the key is the index of the descriptor, and the value is the respective handler instance.


logger = logging.getLogger(__name__)

class PresentationSubmission:
Copy link
Member

Choose a reason for hiding this comment

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

don't put the classes within the init file

we are going to refactor all the code within this project to remove this code-style in favour or a proper division of files by scopes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

ImportError: If a module or class cannot be loaded.
"""
handlers = {}

Copy link
Member

Choose a reason for hiding this comment

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

please create and add a pydantic schema validation here for the prensentation_submission object

Copy link
Member

Choose a reason for hiding this comment

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

please put some limits on the presentation submission size, in a way that an attacker might not push 10mb of presentation submission causing resource exaustion to the RP

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added control for byte size and credential number too

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.

Define Presentation Submission Requirements for Verifiable Presentations
2 participants