Skip to content

Commit

Permalink
fix: bad reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Zicchio committed Dec 20, 2024
1 parent 9831fd0 commit 3195550
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 9 additions & 1 deletion pyeudiw/jwk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ def as_dict(self) -> dict:
"""
return self.jwk

def as_public_dict(self) -> dict:
"""
Returns the public key in format of dict.
:returns: The public key in form of dict.
:rtype: dict
"""
return self.public_key

def __repr__(self):
# private part!
return self.as_json()
Expand Down Expand Up @@ -177,4 +185,4 @@ def find_jwk_by_kid(kid: str, jwks: list[dict], as_dict: bool = True) -> dict |
if valid_jwk and kid == valid_jwk:
return jwk if as_dict else JWK(jwk)

raise KidNotFoundError(f"Key with Kid {kid} not found")
raise KidNotFoundError(f"Key with Kid {kid} not found")
3 changes: 1 addition & 2 deletions pyeudiw/trust/default/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from satosa.context import Context
from satosa.response import Response

from pyeudiw.jwt import JWSHelper
from pyeudiw.jwk import JWK
from pyeudiw.jwt.utils import decode_jwt_header
from pyeudiw.satosa.exceptions import (DiscoveryFailedError,
NotTrustedFederationError)
Expand All @@ -30,7 +30,6 @@ class FederationTrustModel(TrustEvaluator):
_ISSUER_METADATA_TYPE = "openid_credential_issuer"

def __init__(self, **kwargs):
# TODO; qui c'è dentro tutta la ciccia: trust chain verification, root of trust, etc
self.metadata_policy_resolver = TrustChainPolicy()
self.federation_jwks = kwargs.get("federation_jwks", [])
pass
Expand Down

0 comments on commit 3195550

Please sign in to comment.