Skip to content

Commit

Permalink
Merge pull request #18 from uc-cdis/fix/validate
Browse files Browse the repository at this point in the history
fix(validate): fix issuers check in require auth
  • Loading branch information
philloooo authored May 2, 2018
2 parents 079981a + f03b887 commit 52ab0df
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions authutils/token/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,10 @@ def validate_jwt(
"""
if not issuers:
issuers = []
issuers.append(
flask.current_app.config.get('OIDC_ISSUER')
or flask.current_app.config.get('USER_API')
or flask.current_app.config.get('BASE_URL')
)
for config_var in ['OIDC_ISSUER', 'USER_API', 'BASE_URL']:
value = flask.current_app.config.get(config_var)
if value:
issuers.append(value)
if public_key is None:
public_key = get_public_key_for_token(
encoded_token,
Expand Down

0 comments on commit 52ab0df

Please sign in to comment.