From 2730057714257e92a9cdcec421aa22d723c87e7e Mon Sep 17 00:00:00 2001 From: John Anderson Date: Mon, 4 Nov 2024 23:23:45 -0500 Subject: [PATCH] feat(jans-cedarling): first take on doing something useful with identity_source Signed-off-by: John Anderson --- jans-cedarling/cedarling/src/init/service_config.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jans-cedarling/cedarling/src/init/service_config.rs b/jans-cedarling/cedarling/src/init/service_config.rs index 4aaac39cb74..069de05297c 100644 --- a/jans-cedarling/cedarling/src/init/service_config.rs +++ b/jans-cedarling/cedarling/src/init/service_config.rs @@ -50,6 +50,19 @@ impl ServiceConfig { }) .collect::, _>>()?; + // TODO Is this where identity_source should be handled? + let _identity_source_and_openid = policy_store + .identity_source + .clone() // we need clone to avoid borrowing + .unwrap_or_default() + .values() + .map(|identity_source| { + // TODO This will need to be generalised. + // TrustedIssuerAndOpenIdConfig::fetch(identity_source.clone(), &client) + Ok(identity_source.openid_configuration_endpoint.clone()) + }) + .collect::, jwt::KeyServiceError>>()?; + let builder = ServiceConfig::builder() .jwt_algorithms(parse_jwt_algorithms(bootstrap)?) .policy_store(policy_store)