From 3ba56f164c311e85553efad184d2e6fbdfa82e1c Mon Sep 17 00:00:00 2001 From: Romain Jeannoutot Date: Wed, 20 Apr 2022 17:08:45 +0200 Subject: [PATCH] feat(token): trim pubsub message attribute token with bearer prefix --- token.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/token.go b/token.go index 6f3d315..9009e31 100644 --- a/token.go +++ b/token.go @@ -137,5 +137,5 @@ func RetrieveTokenFromPubSubMessageAttribute(r *http.Request) (string, error) { return "", ErrMissingAuthorization } - return token, nil + return strings.TrimPrefix(token, authorizationPrefix), nil }