pyeudiw.trust.model package

Submodules

pyeudiw.trust.model.trust_source module

class pyeudiw.trust.model.trust_source.TrustEvaluationType(attribute_name: str, expiration_date: int, jwks: list[dict[str, str]] | list[JWK] = [], trust_handler_name: str = '', crls: list[dict[str, str]] = [], **kwargs)[source]

Bases: object

TrustEvaluationType is a dataclass that holds one of the trust parameters for a trust source.

property expired: bool

Return whether the trust parameter data has expired.

Returns:

Whether the trust parameter data has expired

Return type:

bool

get_jwks() list[dict][source]
serialize() Dict[str, Any][source]

Serialize the trust parameter data.

Returns:

The serialized trust parameter data

Return type:

dict[str, any]

class pyeudiw.trust.model.trust_source.TrustSourceData(entity_id: str, policies: dict = {}, metadata: dict = {}, revoked: bool = False, **kwargs)[source]

Bases: object

TrustSourceData is a dataclass that holds the trust data of a trust source.

add_trust_param(ttype: str, trust_params: TrustEvaluationType) None[source]

Add a trust source to the trust source.

Parameters:
  • type (str) – The type of the trust source

  • trust_params (TrustEvaluationType) – The trust parameters of the trust source

static empty(entity_id: str) TrustSourceData[source]

Return the empty trust source data.

Parameters:

entity_id (str) – The entity id of the trust source

Returns:

The empty trust source data

Return type:

TrustSourceData

static from_dict(data: dict) TrustSourceData[source]

Return the trust source data from the given dictionary.

Parameters:

data (dict) – The dictionary to create the trust source data from

Returns:

The trust source data from the given dictionary

Return type:

TrustSourceData

get_trust_evaluation_type_by_handler_name(handler_name: str) TrustEvaluationType | None[source]

Return the trust source of the given handler name.

Parameters:

handler_name (str) – The handler name of the trust source

Returns:

The trust source of the given handler name

Return type:

TrustEvaluationType

get_trust_param(ttype: str) TrustEvaluationType | None[source]

Return the trust source of the given type.

Parameters:

type (str) – The type of the trust source

Returns:

The trust source of the given type

Return type:

TrustEvaluationType

has_trust_param(ttype: str) bool[source]

Return whether the trust source has a trust source of the given type.

Parameters:

type (str) – The type of the trust source

Returns:

Whether the trust source has a trust source of the given type

Return type:

bool

is_revoked() bool[source]

Return whether the trust source is revoked.

Returns:

Whether the trust source is revoked

Return type:

bool

serialize() Dict[str, Any][source]

Serialize the trust source data.

Returns:

The serialized trust source data

Return type:

dict[str, any]

Module contents

pyeudiw.trust.model.TrustModuleConfiguration_T

alias of _DynamicTrustConfiguration