MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / getBearerToken

Method getBearerToken

rest/handler.go:1431–1438  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1429}
1430
1431func (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
1441func (h *handler) providedAuthCredentials() bool {

Callers 2

setUserForPublicAuthMethod · 0.95

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected