pyeudiw.satosa.backends.openid4vp.presentation_submission package
Submodules
pyeudiw.satosa.backends.openid4vp.presentation_submission.base_vp_parser module
- class pyeudiw.satosa.backends.openid4vp.presentation_submission.base_vp_parser.BaseVPParser(trust_evaluator: CombinedTrustEvaluator, **kwargs)[source]
Bases:
ABCStandard interface for parsing Verifiable Presentations (VP). Each parser must implement these methods to ensure uniformity.
pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions module
- exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.MalformedPath[source]
Bases:
ExceptionException raised when a path inside the descriptor map is malformed.
- exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.MissingHandler[source]
Bases:
ExceptionException raised when a handler is missing.
- exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.ParseError[source]
Bases:
ExceptionException raised when parsing fails.
- exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.SubmissionValidationError[source]
Bases:
ExceptionException raised when a submission is invalid.
pyeudiw.satosa.backends.openid4vp.presentation_submission.schemas module
- class pyeudiw.satosa.backends.openid4vp.presentation_submission.schemas.DescriptorSchema(*, id: str, format: str, path: str, path_nested: dict[str, Any] = None)[source]
Bases:
BaseModel- format: str
- id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- path: str
- path_nested: dict[str, Any]
- class pyeudiw.satosa.backends.openid4vp.presentation_submission.schemas.PresentationSubmissionSchema(*, id: str, definition_id: str, descriptor_map: list[DescriptorSchema])[source]
Bases:
BaseModel- definition_id: str
- descriptor_map: list[DescriptorSchema]
- id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Module contents
- class pyeudiw.satosa.backends.openid4vp.presentation_submission.PresentationSubmissionHandler(config: CredentialPresentationHandlers)[source]
Bases:
object- parse(submission: dict[str, Any], vp_tokens: list[str]) list[dict][source]
Parse the presentation submission data using the appropriate handler.
- Parameters:
submission (dict[str, Any]) – The presentation submission data.
- Raises:
MissingHandler – If the handler for the format is not found.
VPTokenDescriptorMapMismatch – If the number of VP tokens does not match the number of descriptors.
ParseError – If parsing fails.
- Returns:
Parsed presentation submission data.
- Return type:
dict
- validate(submission: dict[str, Any], vp_tokens: list[str], verifier_id: str, verifier_nonce: str) None[source]
Validate the presentation submission data using the appropriate handler.
- Parameters:
submission (dict[str, Any]) – The presentation submission data.
- Raises:
MissingHandler – If the handler for the format is not found.
VPTokenDescriptorMapMismatch – If the number of VP tokens does not match the number of descriptors.
ParseError – If parsing fails.