(resource resource, feed Feed)
| 56 | } |
| 57 | |
| 58 | func (a authenticator) feedAuth(resource resource, feed Feed) authFunc { |
| 59 | return func(req *http.Request) error { |
| 60 | var feedID string |
| 61 | if feed != nil { |
| 62 | feedID = a.feedID(feed) |
| 63 | } else { |
| 64 | feedID = "*" |
| 65 | } |
| 66 | return a.jwtSignRequest(req, a.jwtFeedClaims(resource, actions[req.Method], feedID)) |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | func (a authenticator) collectionsAuth(req *http.Request) error { |
| 71 | claims := jwt.MapClaims{ |