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: ABC

Standard interface for parsing Verifiable Presentations (VP). Each parser must implement these methods to ensure uniformity.

abstractmethod parse(token: str) Dict[str, Any][source]

Parses a Verifiable Presentation token.

abstractmethod validate(token: str, verifier_id: str, verifier_nonce: str) bool[source]

Validates the content of a Verifiable Presentation.

pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions module

exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.MalformedPath[source]

Bases: Exception

Exception raised when a path inside the descriptor map is malformed.

exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.MissingHandler[source]

Bases: Exception

Exception raised when a handler is missing.

exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.ParseError[source]

Bases: Exception

Exception raised when parsing fails.

exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.SubmissionValidationError[source]

Bases: Exception

Exception raised when a submission is invalid.

exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.VPTokenDescriptorMapMismatch[source]

Bases: Exception

Exception raised when the number of tokens does not match the number of descriptors.

exception pyeudiw.satosa.backends.openid4vp.presentation_submission.exceptions.ValidationError[source]

Bases: Exception

Exception raised when parsing fails.

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

classmethod check_descriptor_map_size(value)[source]
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:
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: