(r *http.Request)
| 214 | } |
| 215 | |
| 216 | func (t *tokenAuth) AllowedAccess(r *http.Request) Operation { |
| 217 | if authTokenHeaderMatches(r) { |
| 218 | return OpAll |
| 219 | } |
| 220 | if websocketTokenMatches(r) { |
| 221 | return OpAll |
| 222 | } |
| 223 | return 0 |
| 224 | } |
| 225 | |
| 226 | func (t *tokenAuth) AddAuthHeader(r *http.Request) { |
| 227 | r.Header.Set("Authorization", "Token "+t.token) |
nothing calls this directly
no test coverage detected