pyeudiw.tests.trust package

Subpackages

Submodules

pyeudiw.tests.trust.mock_trust_handler module

class pyeudiw.tests.trust.mock_trust_handler.MockTrustHandler(*args, **kwargs)[source]

Bases: TrustHandlerInterface

Mock realization of TrustEvaluator for testing purposes only

extract_and_update_trust_materials(issuer: str, trust_source: TrustSourceData) TrustSourceData[source]

Extract the trust material of a certain issuer using a trust handler implementation.

Parameters:
  • issuer (str) – The issuer

  • trust_source (TrustSourceData) – The trust source to update

Returns:

The updated trust source

Return type:

TrustSourceData

extract_jwt_header_trust_parameters(trust_source: TrustSourceData) dict[source]

Parse a trust source to extract the trust parameters (in the source) that can be used as a JWT header according to what this very own trust evaluation mechanism is capable of understanding.

Some trust evaluation mechanism is not associated to any JWT header mechanism, in which case an empty dictionary is returned.

get_metadata(issuer: str, trust_source: TrustSourceData) dict[source]

Get the metadata of a certain issuer if is needed by the specifics.

Parameters:
  • issuer (str) – The issuer

  • trust_source (TrustSourceData) – The trust source to update

Returns:

The updated trust source

Return type:

TrustSourceData

class pyeudiw.tests.trust.mock_trust_handler.NonConformatTrustHandler[source]

Bases: object

extract(issuer: str, trust_source: TrustSourceData) TrustSourceData[source]
get_metadata(issuer: str, trust_source: TrustSourceData) dict[source]
class pyeudiw.tests.trust.mock_trust_handler.UpdateTrustHandler(*args, **kwargs)[source]

Bases: MockTrustHandler

Mock realization of TrustEvaluator for testing purposes only

extract_and_update_trust_materials(issuer: str, trust_source: TrustSourceData) TrustSourceData[source]

Extract the trust material of a certain issuer using a trust handler implementation.

Parameters:
  • issuer (str) – The issuer

  • trust_source (TrustSourceData) – The trust source to update

Returns:

The updated trust source

Return type:

TrustSourceData

extract_jwt_header_trust_parameters(trust_source: TrustSourceData) dict[source]

Parse a trust source to extract the trust parameters (in the source) that can be used as a JWT header according to what this very own trust evaluation mechanism is capable of understanding.

Some trust evaluation mechanism is not associated to any JWT header mechanism, in which case an empty dictionary is returned.

pyeudiw.tests.trust.test_anchor_loading module

pyeudiw.tests.trust.test_dynamic module

Module contents