From 711f77cb90ef9a3bbd175df4876653e12fbca944 Mon Sep 17 00:00:00 2001
From: GARNIER Laurent <laurent.garnier@irisa.fr>
Date: Wed, 24 Nov 2021 22:14:14 +0000
Subject: [PATCH] Revert "Merge branch 'jupyter-token_2021' into 'master'"

This reverts merge request !5
---
 allgo/__init__.py | 48 +----------------------------------------------
 1 file changed, 1 insertion(+), 47 deletions(-)

diff --git a/allgo/__init__.py b/allgo/__init__.py
index 1f87f9a..6b7e252 100644
--- a/allgo/__init__.py
+++ b/allgo/__init__.py
@@ -2,7 +2,6 @@ import logging
 import os
 import time
 
-
 try:
     from urllib.parse import urlparse, urlencode
     from urllib.request import urlopen, Request
@@ -14,12 +13,8 @@ except ImportError:
 import requests
 
 log = logging.getLogger('allgo')
-# API version
-__version__ = '0.2.1'
-# API token for JupyterLab
+__version__ = '0.1.11'
 
-API_token = None
-API_token_valid = False
 
 def local_token():
     from os.path import expanduser
@@ -29,47 +24,6 @@ def local_token():
         with open(filetoken) as f:
             return f.read()
 
-class Init:
-    """
-    manage initialization of the API.
-    check if there is an existing token
-       | No: generate a temporary token and return the allgo login page
-       | Yes: Display "Allgo is already initialized"
-
-    """
-
-    def __init__(self):
-        """Initialization of Allgo-instance.
-
-        Parameters
-        ----------
-        Returns
-        -------
-        string
-            allgo login page link or already initialized message
-        """
-        
-        
-        
-        #   if user.is_authenticated:
-        #       print("User authenticated")
-        #   else:
-        #       print("User not authenticated")
-     
-        # is token valid ?
-        if not API_token_valid:
-            # Generate temp token
-            print("First: " + API_token+  " \n")
-            API_token = get_random_string(length=32)
-            print("____")
-            print("You need first to sign in with your existing https://allgo18.inria.fr/accounts/login/?token=" + API_token+  " A||GO account \n")
-            print("____")
-        else:
-            # FIXME : Have to check that the user is register
-            print("____")
-            msg = "A||GO already initialized\n"
-            print("____")
-            print(msg)
 
 class App:
     """
-- 
GitLab