code: func (c *TokenCommand) List(client auth.ClientI) error {
  	tokens, err := client.GetTokens()
  	if err != nil {
  		return trace.Wrap(err)
  	}
  	if len(tokens) == 0 {
  		fmt.Println("No active tokens found.")
  		return nil
  	}
  
  	// Sort by expire time.
  	sort.Slice(tokens, func(i, j int) bool { return tokens[i].Expiry().Unix() < tokens[j].Expiry().Unix() })
  
  	if c.format == teleport.Text {
  		tokensView := func() string {
  			table := asciitable.MakeTable([]string{"Token", "Type", "Expiry Time (UTC)"})
  			for _, t := range tokens {
  				expiry := "never"
  				if t.Expiry().Unix() > 0 {
  					expiry = t.Expiry().Format(time.RFC822)
  				}
  				table.AddRow([]string{t.GetName(), t.GetRoles().String(), expiry})
  			}
  			return table.AsBuffer().String()
  		}
  		fmt.Printf(tokensView())
  	} else {
  		data, err := json.MarshalIndent(tokens, "", "  ")
  		if err != nil {
  			return trace.Wrap(err, "failed to marshal tokens")
  		}
  		fmt.Printf(string(data))
  	}
  	return nil
  }
docs: // List is called to execute "tokens ls" command.