Skip to content

Commit

Permalink
Merge pull request #2921 from minrk/token-env
Browse files Browse the repository at this point in the history
allow setting token via JUPYTER_TOKEN env
  • Loading branch information
takluyver authored Oct 11, 2017
2 parents a8c6b8b + 91469d2 commit 4a3fa4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,9 @@ def _write_cookie_secret_file(self, secret):

@default('token')
def _token_default(self):
if os.getenv('JUPYTER_TOKEN'):
self._token_generated = False
return os.getenv('JUPYTER_TOKEN')
if self.password:
# no token if password is enabled
self._token_generated = False
Expand Down

0 comments on commit 4a3fa4a

Please sign in to comment.