diff --git a/connexion/security.py b/connexion/security.py index 62a10719d..027bc3054 100644 --- a/connexion/security.py +++ b/connexion/security.py @@ -493,8 +493,18 @@ def parse_security_scheme( security_handler = self.security_handlers["apiKey"] return security_handler().get_fn(security_scheme, required_scopes) + elif security_type == "openIdConnect": + if security_type in self.security_handlers: + security_handler = self.security_handlers[security_type] + return security_handler().get_fn(security_scheme, required_scopes) + logger.warning("... No default implementation for openIdConnect") + return None + # Custom security scheme handler - elif "scheme" in security_scheme and (scheme := security_scheme["scheme"].lower()) in self.security_handlers: + elif ( + "scheme" in security_scheme + and (scheme := security_scheme["scheme"].lower()) in self.security_handlers + ): security_handler = self.security_handlers[scheme] return security_handler().get_fn(security_scheme, required_scopes)