code: func (h ApiAAAHandler) handleTokenInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
  	ctx := r.Context()
  	defer statsd.NewStatsDTiming(ctx).Send("api-aaa.token_info")
  
  	info, expiration := h.authorization.GetTokenInfoFromBearerRequest(ctx, r)
  
  	if info != nil {
  		// We'll want to render the roles as an array, not as a map
  		prettyInfo := PrettyTokenInfo{
  			AdminActions: make([]string, len(info.AdminActions())),
  			AdminRoles:   make([]string, len(info.AdminRoles)),
  			TenantId:     info.TenantId,
  			Username:     info.Username,
  			ExpiresAt:    expiration,
  		}
  
  		i := 0
  		for r, _ := range info.AdminActions() {
  			prettyInfo.AdminActions[i] = r
  			i++
  		}
  
  		i = 0
  		for r, _ := range info.AdminRoles {
  			prettyInfo.AdminRoles[i] = r
  			i++
  		}
  
  		w.WriteHeader(http.StatusOK)
  		res, _ := json.Marshal(map[string]interface{}{
  			"item": prettyInfo,
  		})
  		fmt.Fprintf(w, string(res))
  	} else {
  		w.WriteHeader(http.StatusNotFound)
  		res, _ := json.Marshal(map[string]string{
  			"message": "Couldn't find any information for the current token. Either it is invalid or it has expired.",
  		})
  		fmt.Fprintf(w, string(res))
  	}
  }
docs: // Handle getting the token info