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

Function makeGitHubHeader

providers/github.go:86–92  ·  view source on GitHub ↗
(accessToken string)

Source from the content-addressed store, hash-verified

84}
85
86func makeGitHubHeader(accessToken string) http.Header {
87 // extra headers required by the GitHub API when making authenticated requests
88 extraHeaders := map[string]string{
89 acceptHeader: "application/vnd.github.v3+json",
90 }
91 return makeAuthorizationHeader(tokenTypeToken, accessToken, extraHeaders)
92}
93
94func (p *GitHubProvider) makeGitHubAPIEndpoint(endpoint string, params *url.Values) *url.URL {
95 basePath := p.ValidateURL.Path

Callers 8

ValidateSessionMethod · 0.85
hasRepoAccessMethod · 0.85
hasUserMethod · 0.85
isCollaboratorMethod · 0.85
getEmailMethod · 0.85
getUserMethod · 0.85
getOrgsMethod · 0.85
getTeamsMethod · 0.85

Calls 1

makeAuthorizationHeaderFunction · 0.85

Tested by

no test coverage detected