@@ -22,15 +22,7 @@ def __init__(self, config: dict, internal_attributes: dict[str, dict[str, str |
2222 """
2323 super ().__init__ (config , internal_attributes , base_url , name )
2424 self .metadata_jwks = config .get ("metadata_jwks" , [])
25-
26- @property
27- def authority_hints (self ):
28- return (
29- self .config .get ("trust" , {})
30- .get ("federation" , {})
31- .get ("config" , {})
32- .get ("authority_hints" , [])
33- )
25+ self .federation_config = self .config .get ("trust" , {}).get ("federation" , {}).get ("config" , {})
3426
3527 def _ensure_credential_issuer (self , metadata : dict , metadata_key : str , issuer_key :str ):
3628 metadata_val = metadata .get (metadata_key )
@@ -52,13 +44,13 @@ def metadata(self) -> dict:
5244 def entity_configuration_as_dict (self ) -> dict :
5345 """Returns the entity configuration as a dictionary."""
5446 ec_payload = {
55- "exp" : exp_from_now (minutes = self .credential_configuration . entity_configuration_exp ),
47+ "exp" : exp_from_now (minutes = self .federation_config . get ( " entity_configuration_exp" ) ),
5648 "iat" : iat_now (),
5749 "iss" : self .entity_id ,
5850 "sub" : self .entity_id ,
5951 "jwks" : {"keys" : self .metadata_jwks },
6052 "metadata" : self .metadata ,
61- "authority_hints" : self .authority_hints ,
53+ "authority_hints" : self .federation_config . get ( " authority_hints" , []) ,
6254 }
6355 return ec_payload
6456
@@ -105,7 +97,6 @@ def _validate_configs(self):
10597 ])
10698 self ._validate_required_configs ([
10799 ("credential_configurations.entity_default_sig_alg" , credential_configuration .entity_default_sig_alg ),
108- ("credential_configurations.entity_configuration_exp" , credential_configuration .entity_configuration_exp ),
109100 ])
110101
111102 self .credential_configuration = credential_configuration
0 commit comments