Skip to content

Commit

Permalink
Configurable OMS api URL, default to production
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Aug 7, 2023
1 parent 79b8b3d commit 2ef6350
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ DJANGO_SECRET_PASS=
# For connecting to OMS
OMS_CLIENT_ID=
OMS_CLIENT_SECRET=
# OMS_API_URL=https://cmsoms.cern.ch/agg/api
# OMS_API_AUDIENCE=cmsoms-prod

# For connecting to Run Registry. You can reuse
# the OMS_CLIENT_ID and OMS_CLIENT_SECRET
Expand Down
12 changes: 7 additions & 5 deletions omsapi/apiconfig.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from decouple import config

API_URL = 'https://vocms0185.cern.ch/agg/api'
API_VERSION = 'v1'
API_AUDIENCE = 'cmsoms-int-0185'
OMS_CLIENT_ID = config('OMS_CLIENT_ID')
OMS_CLIENT_SECRET = config('OMS_CLIENT_SECRET')
# See other options here:
# https://gitlab.cern.ch/cmsoms/oms-api-client/-/wikis/uploads/01fe5b10560e76849ce636cf53e59e20/OMS_CERN_OpenID_API__2022_.pdf
API_URL = config("OMS_API_URL", "https://cmsoms.cern.ch/agg/api")
API_VERSION = "v1"
API_AUDIENCE = config("OMS_API_AUDIENCE", "cmsoms-prod")
OMS_CLIENT_ID = config("OMS_CLIENT_ID")
OMS_CLIENT_SECRET = config("OMS_CLIENT_SECRET")

0 comments on commit 2ef6350

Please sign in to comment.