Skip to content

Commit 240c90d

Browse files
committed
Rename to be more specific about GitHub tokens
1 parent 53adf08 commit 240c90d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/http/middleware/token.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var (
2727
errUnsupportedAuthorizationHeader = fmt.Errorf("%w: unsupported Authorization header", mark.ErrBadRequest)
2828
)
2929

30-
var supportedThirdPartyTokenPrefixes = []string{
30+
var supportedGitHubPrefixes = []string{
3131
"ghp_", // Personal access token (classic)
3232
"github_pat_", // Fine-grained personal access token
3333
"gho_", // OAuth access token
@@ -98,7 +98,7 @@ func parseAuthorizationHeader(req *http.Request) (authType authType, token strin
9898
return authTypeIDE, token, nil
9999
}
100100

101-
for _, prefix := range supportedThirdPartyTokenPrefixes {
101+
for _, prefix := range supportedGitHubPrefixes {
102102
if strings.HasPrefix(token, prefix) {
103103
return authTypeGhToken, token, nil
104104
}

0 commit comments

Comments
 (0)