Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 56c42c55 authored by GARNIER Laurent's avatar GARNIER Laurent
Browse files

Remove API_token from API_parameter_list

parent 5fad5a4f
Branches
No related tags found
1 merge request!7Jupyter token 2021
...@@ -26,14 +26,13 @@ __version__ = StrictVersion('0.2.5') ...@@ -26,14 +26,13 @@ __version__ = StrictVersion('0.2.5')
################################################## ##################################################
API_parameter_list = {'allgo_instance':'url','verbose_level':['errors', 'warnings', 'all'],'auth_method':['notebook','local_file','env_variable', 'arg_variable'],'timeout':'int value in sec','API_token':'str value'} API_parameter_list = {'allgo_instance':'url','verbose_level':['errors', 'warnings', 'all'],'auth_method':['notebook','local_file','env_variable', 'arg_variable'],'timeout':'int value in sec'}
# timeout: automatic login default retry time in seconds # timeout: automatic login default retry time in seconds
# verbose_level: default verbose level # verbose_level: default verbose level
# API_token: default authentification token:
# auth_method: notebook, local_file, env_variable, arg_variable # auth_method: notebook, local_file, env_variable, arg_variable
# allgo_instance: The default Allgo url used # allgo_instance: The default Allgo url used
API_parameters = {'allgo_instance':'https://allgo18.inria.fr','verbose_level':'warnings','auth_method':'notebook','timeout':60,'API_token':''} API_parameters = {'allgo_instance':'https://allgo18.inria.fr','verbose_level':'warnings','auth_method':'notebook','timeout':60}
# allgo API token validate on allgo plateform # allgo API token validate on allgo plateform
API_token_valid = False API_token_valid = False
...@@ -106,15 +105,6 @@ class Init: ...@@ -106,15 +105,6 @@ class Init:
if(not API_parameters['verbose_level'] == 'errors'): if(not API_parameters['verbose_level'] == 'errors'):
print("\n 'timeout' not an 'int' restored to default: "+str(API_parameters['timeout'])) print("\n 'timeout' not an 'int' restored to default: "+str(API_parameters['timeout']))
if 'API_token' in kwargs:
if(kwargs['API_token'].isalnum()):
API_parameters['API_token'] = kwargs['API_token']
else:
if(not API_parameters['verbose_level'] == 'errors'):
print("\n 'API_token' is not a valid alphanumerical token")
notebook_initialized = False
return
if 'allgo_instance' in kwargs: if 'allgo_instance' in kwargs:
API_parameters['allgo_instance'] = kwargs['allgo_instance'] API_parameters['allgo_instance'] = kwargs['allgo_instance']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment