Skip to content

Commit 0880a3a

Browse files
committed
don't log when unexpected tokens are encountered
This is logging waaay more than intended.
1 parent 2fe535b commit 0880a3a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

data/service/api/v1/datasets_data_create.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ func CollectProvenanceInfo(ctx context.Context, req *rest.Request, authDetails r
147147

148148
if token != "" && shouldHaveJWT(authDetails) {
149149
claims := &TokenClaims{}
150-
if _, _, err := jwt.NewParser().ParseUnverified(token, claims); err != nil {
151-
lgr.WithError(err).Warn("Unable to parse access token for provenance")
152-
} else {
150+
if _, _, err := jwt.NewParser().ParseUnverified(token, claims); err == nil {
153151
provenance.ClientID = claims.ClientID
154152
}
155153
} else if !authDetails.IsService() {

0 commit comments

Comments
 (0)