Skip to content

Commit

Permalink
fix: trim bearer token prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
lu1as committed Feb 17, 2024
1 parent cc90ef4 commit 4fba3e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func handleAuth(w http.ResponseWriter, r *http.Request) {
}

func verifyToken(ctx context.Context, token string, audiences []string, allowed []string) (bool, error) {
token = strings.TrimPrefix(token, "Bearer ")
tr := authv1.TokenReview{
Spec: authv1.TokenReviewSpec{
Token: token,
Expand Down

0 comments on commit 4fba3e3

Please sign in to comment.