(f http.HandlerFunc, srv *server.Server)
| 59 | } |
| 60 | |
| 61 | func validateToken(f http.HandlerFunc, srv *server.Server) http.HandlerFunc { |
| 62 | return func(w http.ResponseWriter, r *http.Request) { |
| 63 | _, err := srv.ValidationBearerToken(r) |
| 64 | if err != nil { |
| 65 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 66 | return |
| 67 | } |
| 68 | |
| 69 | f.ServeHTTP(w, r) |
| 70 | } |
| 71 | } |
no test coverage detected
searching dependent graphs…