Unauthorized, The input authorization token can't serve the request: url encoding issue
See original GitHub issueSimilar to #82, we’re seeing the error message in the title. The full error object is this:
{
"code":"Unauthorized",
"message":"The input authorization token can\'t serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: \'put\\ndocs\\ndbs/testdb/colls/pouchdb-test-collection/docs/ÿattach-storeÿmd5-CRq749X7/wgSD6EQeGTuFg==\\nwed, 21 jun 2017 21:28:58 gmt\\n\\n\'\\r\\nActivityId: 9f9d22ea-9c51-4b4e-bd51-de7ca5a68c1e"
}
My doc id is ÿattach-storeÿmd5-CRq749X7%2fwgSD6EQeGTuFg==
and as you can see it has a %2f
in it, and the underlying auth system seems to do a URL-Decode on the input key when signing the request.
Is this expected behaviour? What is the recommended way to encode and decode keys in a way that it is safe with DocumentDB/CosmosDB?
Grateful for any help 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Unauthorized, The input authorization token can't serve the ...
Unauthorized, The input authorization token can't serve the request. As far as I know, the default valid timespan of the resource token is ......
Read more >I got a message "The input authorization token can't serve the ...
I got a message "The input authorization token can't serve the request" when I called a container.replace_throughput method.
Read more >Setting Up Authentication and Authorization with Apollo ...
Set up Apollo Gateway and an implementing service with a federated schema to manage access to user account data; Sign a JWT for...
Read more >401 Unauthorized - HTTP - MDN Web Docs
This status code is sent with an HTTP WWW-Authenticate response header that contains information on how the client can request for the resource ......
Read more >Self-Encoded Access Tokens - OAuth 2.0 Simplified
The main benefit of this is that API servers are able to verify access tokens without doing a database lookup on every API...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2019 still getting this error as well