docstr: Koa, 04 May 2022    Use state to get token
docstr_tok: ["Koa",",","04","May","2022","Use","state","to","get","token"]
code: def sso_get_token(self, state):
      """
      Koa, 04 May 2022    Use state to get token
      """
  
      # from .pygraphistry import PyGraphistry
  
      base_path = self.server_base_path
      out = requests.get(
          f"{base_path}/api/v2/o/sso/oidc/jwt/{state}/",
          verify=self.certificate_validation,
      )
      json_response = None
      try:
          json_response = out.json()
          # print("get_jwt : {}".format(json_response))
          self.token = None
          if not ("status" in json_response):
              raise Exception(out.text)
          else:
              if json_response["status"] == "OK":
                  if "token" in json_response["data"]:
                      self.token = json_response["data"]["token"]
                  if "active_organization" in json_response["data"]:
                      logger.debug(
                          "@ArrowUploader.sso_get_token, org_name: %s",
                          json_response["data"]["active_organization"][
                              "slug"
                          ],
                      )
                      self.org_name = json_response["data"][
                          "active_organization"
                      ]["slug"]
  
      except Exception as e:
          logger.error(
              "Unexpected SSO authentication error: %s",
              out,
              exc_info=True,
          )
          raise e
  
      return self
  
imports: from typing import List, Optional
  import io, pyarrow, requests, sys
  from graphistry.privacy import Mode, Privacy
  from .ArrowFileUploader import ArrowFileUploader
  from .util import setup_logger
label_desc: Use image node_id 32 for calling the ArrowUploader obj's underlying member method code with example usage: obj.sso_get_token(state) and returns: self