We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dba2499 commit a67ce51Copy full SHA for a67ce51
aws_lambda_powertools/event_handler/openapi/swagger_ui/oauth2.py
@@ -52,7 +52,10 @@ class Config:
52
53
@validator("clientSecret", always=True)
54
def client_secret_only_on_dev(cls, v: Optional[str]) -> Optional[str]:
55
- if v and not powertools_dev_is_set():
+ if not v:
56
+ return None
57
+
58
+ if not powertools_dev_is_set():
59
raise ValueError(
60
"cannot use client_secret without POWERTOOLS_DEV mode. See "
61
"https://docs.powertools.aws.dev/lambda/python/latest/#optimizing-for-non-production-environments",
@@ -63,8 +66,7 @@ def client_secret_only_on_dev(cls, v: Optional[str]) -> Optional[str]:
63
66
"DO NOT USE THIS OUTSIDE LOCAL DEVELOPMENT",
64
67
stacklevel=2,
65
68
)
-
- return v
69
+ return v
70
71
72
def generate_oauth2_redirect_html() -> str:
0 commit comments