()
| 1429 | } |
| 1430 | |
| 1431 | func (h *handler) getBearerToken() string { |
| 1432 | auth := h.rq.Header.Get("Authorization") |
| 1433 | if strings.HasPrefix(auth, "Bearer ") { |
| 1434 | token := auth[7:] |
| 1435 | return token |
| 1436 | } |
| 1437 | return "" |
| 1438 | } |
| 1439 | |
| 1440 | // providedAuthCredentials returns true if basic auth or session auth is enabled |
| 1441 | func (h *handler) providedAuthCredentials() bool { |
no test coverage detected