Cosmosdb has the concept of a permission
for a user
. That permission contains a token
that can be used to access a specified partition for a limited time with limited access.
I've created a resource token broker, which creates the permission, retrieves the token and returns it to a client Xamarin Forms app. So far so good.
If I am using the DocumentClient
from the .NET
SDK, that token - unmodified - works great.
However, I'd like to avoid having a dependency on DocumentClient
in my app and just instead make REST api calls directly to Cosmosdb.
If I put that token
in the authorization header, I get format errors for that header. I can't find the source code to the SDK, and all the samples are built modifying a master token.
Can anyone explain/point/sample me on what I have to do to that resource token
that I get from the permission
to make it an acceptable header so I can just make a REST call?
TIA