code: def _selftoken_expired():
      '''
      Validate the current token exists and is still valid
      '''
      try:
          verify = __opts__['vault'].get('verify', None)
          url = '{0}/v1/auth/token/lookup-self'.format(__opts__['vault']['url'])
          if 'token' not in __opts__['vault']['auth']:
              return True
          headers = {'X-Vault-Token': __opts__['vault']['auth']['token']}
          response = requests.get(url, headers=headers, verify=verify)
          if response.status_code != 200:
              return True
          return False
      except Exception as e:
          raise salt.exceptions.CommandExecutionError(
              'Error while looking up self token : {0}'.format(six.text_type(e))
              f _selftoken_expired():
      '''
      Validate the current token exists and is still valid
      '''
      try:
          verify = __opts__['vault'].get('verify', None)
          url = '{0}/v1/auth/token/lookup-self'.format(__opts__['vault']['url'])
          if 'token' not in __opts__['vault']['auth']:
              return True
          headers = {'X-Vault-Token': __opts__['vault']['auth']['token']}
          response = requests.get(url, headers=headers, verify=verify)
          if response.status_code != 200:
              return True
          return False
      except Exception as e:
          raise salt.exceptions.CommandExecutionError(
              'Error while looking up self token : {0}'.format(six.text_type(e))
              )
docs: Validate the current token exists and is still valid