pyeudiw.trust.default package

Submodules

pyeudiw.trust.default.direct_trust_sd_jwt_vc module

class pyeudiw.trust.default.direct_trust_sd_jwt_vc.DirectTrust[source]

Bases: TrustEvaluator

class pyeudiw.trust.default.direct_trust_sd_jwt_vc.DirectTrustSdJwtVc(httpc_params: dict | None = None, cache_ttl: int = 0, jwk_endpoint: str = '/.well-known/jwt-vc-issuer', metadata_endpoint: str = '/.well-known/openid-credential-issuer')[source]

Bases: DirectTrust

DirectTrust trust models assumes that an issuer is always trusted, in the sense that no trust verification actually happens. The issuer is assumed to be an URI and its keys and metadata information are publicly exposed on the web. Such keys/metadata can always be fetched remotely and long as the issuer is available.

static build_issuer_jwk_endpoint(issuer_id: str, well_known_path_component: str) str[source]
static build_issuer_metadata_endpoint(issuer: str, metadata_path_component: str) str[source]
get_metadata(issuer: str) dict[source]

Fetches the public metadata of an issuer by interrogating a given endpoint. The endpoint must yield information in a format that can be transalted to a meaning dictionary (such as json)

Returns:

a dictionary of metadata information

get_public_keys(issuer: str) list[dict][source]

Fetches the public key of the issuer by querying a given endpoint. Previous responses might or might not be cached based on the cache_ttl parameter.

Parameters:

issuer (str) – the issuer of the public key

Raises:

InvalidJwkMetadataException – if the jwk metadata is invalid

Returns:

a list of jwk(s)

Module contents