We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53adf08 commit 240c90dCopy full SHA for 240c90d
pkg/http/middleware/token.go
@@ -27,7 +27,7 @@ var (
27
errUnsupportedAuthorizationHeader = fmt.Errorf("%w: unsupported Authorization header", mark.ErrBadRequest)
28
)
29
30
-var supportedThirdPartyTokenPrefixes = []string{
+var supportedGitHubPrefixes = []string{
31
"ghp_", // Personal access token (classic)
32
"github_pat_", // Fine-grained personal access token
33
"gho_", // OAuth access token
@@ -98,7 +98,7 @@ func parseAuthorizationHeader(req *http.Request) (authType authType, token strin
98
return authTypeIDE, token, nil
99
}
100
101
- for _, prefix := range supportedThirdPartyTokenPrefixes {
+ for _, prefix := range supportedGitHubPrefixes {
102
if strings.HasPrefix(token, prefix) {
103
return authTypeGhToken, token, nil
104
0 commit comments