Skip to content

Commit

Permalink
Add openIdConnect option explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruwann committed Dec 13, 2024
1 parent 800d1da commit f701207
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion connexion/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 %s", security_type)
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)

Expand Down

0 comments on commit f701207

Please sign in to comment.