Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oauth2 single scope to multiple scopes #598

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thezultimate
Copy link
Member

WEBVIZ_SCOPE environment variable currently only supports one scope entry/value. This PR extends this to enable multiple scopes separated by comma (,).


Contributor checklist

  • 🎉 This PR closes #ISSUE_NUMBER.
  • 📜 I have broken down my PR into the following tasks:
    • Task 1
    • Task 2
  • 🤖 I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR.
  • 📖 I have considered adding a new entry in CHANGELOG.md, and added it if should be communicated there.

@thezultimate thezultimate force-pushed the oauth2-multi-scopes branch from ae0f414 to abcaaf5 Compare June 10, 2022 10:57
Comment on lines +22 to +23
scope_raw = os.environ["WEBVIZ_SCOPE"]
self._scope = [scope.strip() for scope in scope_raw.split(",")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
scope_raw = os.environ["WEBVIZ_SCOPE"]
self._scope = [scope.strip() for scope in scope_raw.split(",")]
self._scope = [scope.strip() for scope in os.environ["WEBVIZ_SCOPE"].split(",")]

Maybe cleaner (saves a local variable + naming is always difficult 🙂)?

Other than that - LGTM! 👏 Thanks.

Add a changelog entry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants