MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / IsAuthorizedInHeaderWithToken

Function IsAuthorizedInHeaderWithToken

providers/auth_test.go:21–23  ·  view source on GitHub ↗
(reqHeader http.Header, token string)

Source from the content-addressed store, hash-verified

19}
20
21func IsAuthorizedInHeaderWithToken(reqHeader http.Header, token string) bool {
22 return reqHeader.Get("Authorization") == fmt.Sprintf("Bearer %s", token)
23}
24
25func IsAuthorizedInURL(reqURL *url.URL) bool {
26 return reqURL.Query().Get("access_token") == authorizedAccessToken

Callers 2

IsAuthorizedInHeaderFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected