1
mirror of https://github.com/rclone/rclone synced 2024-11-21 22:50:16 +01:00
rclone/backend/box
albertony 0d34efb10f box: fix reconnect failing with HTTP 400 Bad Request
The error is:

  Error: failed to configure token with jwt authentication: jwtutil: failed making auth request: 400 Bad Request

With the following additional debug information:

  jwtutil: Response Body: {"error":"invalid_grant","error_description":"Please check the 'aud' claim. Should be a string"}

Problem is that in jwt-go the RegisteredClaims type has Audience field (aud claim) that
is a list, while box apparantly expects it to be a singular string. In jwt-go v4 we
currently use there is an alternative type StandardClaims which matches what box wants.
Unfortunately StandardClaims is marked as deprecated, and is removed in the
newer v5 version, so we this is a short term fix only.

Fixes #7114
2023-07-14 10:24:33 +01:00
..
api all: fix spelling across the project 2022-08-30 11:16:26 +02:00
box_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
box.go box: fix reconnect failing with HTTP 400 Bad Request 2023-07-14 10:24:33 +01:00
upload.go Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00