Skip to content

Commit

Permalink
Standardize envvar naming for boardwalkd to use the BOARDWALKD_ prefix
Browse files Browse the repository at this point in the history
Updates the BOARDWALK_SECRET, BOARDWALK_GOOGLE_OAUTH_CLIENT_ID, and BOARDWALK_GOOGLE_OAUTH_SECRET to use BOARDWALKD_ as the prefix instead of the prior BOARDWALK_, as we now use click's auto envvar prefix feature with BOARDWALKD as the prefix.
  • Loading branch information
asullivan-blze committed Apr 8, 2024
1 parent 3fa1764 commit 8596695
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/boardwalkd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def cli():
"All requests are performed as an 'anonymous' default user\n\n"
"google_oauth\n\n"
"Uses Google Oauth2 to identify users by their Google account email address."
" BOARDWALK_GOOGLE_OAUTH_CLIENT_ID and BOARDWALK_GOOGLE_OAUTH_SECRET"
" BOARDWALKD_GOOGLE_OAUTH_CLIENT_ID and BOARDWALKD_GOOGLE_OAUTH_SECRET"
" environment variables must be set. The authorized redirect URI should be"
" https://<hostname>/auth/login"
),
Expand Down
8 changes: 4 additions & 4 deletions src/boardwalkd/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def make_app(
# Set-up authentication
if auth_method != "anonymous":
try:
settings["cookie_secret"] = os.environ["BOARDWALK_SECRET"]
settings["cookie_secret"] = os.environ["BOARDWALKD_SECRET"]
except KeyError:
raise BoardwalkException(
(
Expand All @@ -886,13 +886,13 @@ def make_app(
case "google_oauth":
try:
settings["google_oauth"] = {
"key": os.environ["BOARDWALK_GOOGLE_OAUTH_CLIENT_ID"],
"secret": os.environ["BOARDWALK_GOOGLE_OAUTH_SECRET"],
"key": os.environ["BOARDWALKD_GOOGLE_OAUTH_CLIENT_ID"],
"secret": os.environ["BOARDWALKD_GOOGLE_OAUTH_SECRET"],
}
except KeyError:
raise BoardwalkException(
(
"BOARDWALK_GOOGLE_OAUTH_CLIENT_ID and BOARDWALK_GOOGLE_OAUTH_SECRET env vars"
"BOARDWALKD_GOOGLE_OAUTH_CLIENT_ID and BOARDWALKD_GOOGLE_OAUTH_SECRET env vars"
" are required when auth_method is google_oauth"
)
)
Expand Down

0 comments on commit 8596695

Please sign in to comment.