8 "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/sessions"
11var authorizedAccessToken = "imaginary_access_token"
13func CreateAuthorizedSession() *sessions.SessionState {
14 return &sessions.SessionState{AccessToken: authorizedAccessToken}
17func IsAuthorizedInHeader(reqHeader http.Header) bool {
18 return reqHeader.Get("Authorization") == fmt.Sprintf("Bearer %s", authorizedAccessToken)
21func IsAuthorizedInURL(reqURL *url.URL) bool {
22 return reqURL.Query().Get("access_token") == authorizedAccessToken
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list