func listCertificates(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	a, err := getAppFromContext(r.URL.Query().Get(":app"), r)
	if err != nil {
		return err
	}
	allowed := permission.Check(t, permission.PermAppReadCertificate,
		contextsForApp(&a)...,
	)
	if !allowed {
		return permission.ErrUnauthorized
	}
	w.Header().Set("Content-Type", "application/json")
	result, err := a.GetCertificates()
	if err != nil {
		return err
	}
	return json.NewEncoder(w).Encode(&result)
}
func listCertificates(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	a, err := getAppFromContext(r.URL.Query().Get(":app"), r)
	if err != nil {
		return err
	}
	allowed := permission.Check(t, permission.PermAppReadCertificate,
		contextsForApp(&a)...,
	)
	if !allowed {
		return permission.ErrUnauthorized
	}
	w.Header().Set("Content-Type", "application/json")
	result, err := a.GetCertificates()
	if err != nil {
		return err
	}
	return json.NewEncoder(w).Encode(&result)
}
func listCertificates ( w http . ResponseWriter , r * http . Request , t auth . Token ) error { a , err := getAppFromContext ( r . URL . Query ( ) . Get ( " " ) , r ) if err != nil { return err } allowed := permission . Check ( t , permission . PermAppReadCertificate , contextsForApp ( & a ) ... , ) if ! allowed { return permission . ErrUnauthorized } w . Header ( ) . Set ( " " , " " ) result , err := a . GetCertificates ( ) if err != nil { return err } return json . NewEncoder ( w ) . Encode ( & result ) }
// title: list app certificates
// path: /apps/{app}/certificate
// method: GET
// consume: application/x-www-form-urlencoded
// responses:
//   200: Ok
//   401: Unauthorized
//   404: App not found
title : list app certificates path : / apps / { app } / certificate method : GET consume : application / x - www - form - urlencoded responses : 200 : Ok 401 : Unauthorized 404 : App not found