(lmt *limiter.Limiter)
| 133 | } |
| 134 | |
| 135 | func (a *API) limitHandler(lmt *limiter.Limiter) middlewareHandler { |
| 136 | return func(w http.ResponseWriter, req *http.Request) (context.Context, error) { |
| 137 | return req.Context(), a.performRateLimiting(lmt, req) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | // requireOAuthClientAuth authenticates an OAuth client as middleware |
| 142 | // Requires client_id to be present and validates client credentials |