mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +00:00
validate oauth client_id/secret
This commit is contained in:
@@ -428,6 +428,12 @@ class HubOAuth(HubAuth):
|
||||
def _client_secret(self):
|
||||
return os.getenv('JUPYTERHUB_CLIENT_SECRET', '')
|
||||
|
||||
@validate('oauth_client_id', 'oauth_client_secret')
|
||||
def _ensure_not_empty(self, proposal):
|
||||
if not proposal.value:
|
||||
raise ValueError("%s cannot be empty." % proposal.trait.name)
|
||||
return proposal.value
|
||||
|
||||
oauth_redirect_uri = Unicode(
|
||||
help="""OAuth redirect URI
|
||||
|
||||
|
Reference in New Issue
Block a user