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

Method ValidateSession

providers/github.go:151–153  ·  view source on GitHub ↗

ValidateSession validates the AccessToken

(ctx context.Context, s *sessions.SessionState)

Source from the content-addressed store, hash-verified

149
150// ValidateSession validates the AccessToken
151func (p *GitHubProvider) ValidateSession(ctx context.Context, s *sessions.SessionState) bool {
152 return validateToken(ctx, p, s.AccessToken, makeGitHubHeader(s.AccessToken))
153}
154
155func (p *GitHubProvider) hasOrg(s *sessions.SessionState) error {
156 // https://developer.github.com/v3/orgs/#list-your-organizations

Callers

nothing calls this directly

Calls 2

validateTokenFunction · 0.85
makeGitHubHeaderFunction · 0.85

Tested by

no test coverage detected