api/auth.go
func userInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	user, err := auth.ConvertNewUser(t.User())
	if err != nil {
		return err
	}
	perms, err := t.Permissions()
	if err != nil {
		return err
	}
	userData, err := createAPIUser(perms, user, nil, true)
	if err != nil {
		return err
	}
	w.Header().Add("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(userData)
}
func userInfo(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	user, err := auth.ConvertNewUser(t.User())
	if err != nil {
		return err
	}
	perms, err := t.Permissions()
	if err != nil {
		return err
	}
	userData, err := createAPIUser(perms, user, nil, true)
	if err != nil {
		return err
	}
	w.Header().Add("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(userData)
}
// title: user info
// path: /users/info
// method: GET
// produce: application/json
// responses:
//   200: OK
//   401: Unauthorized