Skip to content

Commit

Permalink
Move JWKS URL to env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
matkaczmarek committed Oct 4, 2024
1 parent f76601c commit 13a115f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@
ORCID_CLIENT_SECRET = config('ORCID_CLIENT_SECRET', default=False)
ORCID_SCOPE = config('ORCID_SCOPE', default=False)
ORCID_LOGIN_ENABLED = "openid" in ORCID_SCOPE
ORCID_OPEN_ID_JWKS_URL = config('ORCID_OPEN_ID_JWKS_URL', default=False)

# Tags for the CITISOAPService API
CITI_USERNAME = config('CITI_USERNAME', default='')
Expand Down
2 changes: 1 addition & 1 deletion physionet-django/user/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def validate_orcid_id_token(token):
access_token and signed id_token, this function validates id_token signature
"""

jwks_url = "https://sandbox.orcid.org/oauth/jwks" # ORCID Sandbox JWKS URL
jwks_url = settings.ORCID_OPEN_ID_JWKS_URL
jwks = requests.get(jwks_url).json()
headers = jwt.get_unverified_header(token)

Expand Down

0 comments on commit 13a115f

Please sign in to comment.