Extractor is an interface for extracting a token from an HTTP request. The ExtractToken method should return a token string or an error. If no token is present, you must return ErrNoTokenInRequest.
| 15 | // The ExtractToken method should return a token string or an error. |
| 16 | // If no token is present, you must return ErrNoTokenInRequest. |
| 17 | type Extractor interface { |
| 18 | ExtractToken(*http.Request) (string, error) |
| 19 | } |
| 20 | |
| 21 | // HeaderExtractor is an extractor for finding a token in a header. |
| 22 | // Looks at each specified header in order until there's a match |
no outgoing calls
no test coverage detected