Getting started with UWP

Build with an Azure free account. Get USD200 credit for 30 days and 12 months of free services.
Start free todayYou can authorize your applications to connect to Cosmos DB using master keys or resource tokens. Depending on the level of control that is needed, your application may need to use one or even both of these approaches.
In this episode, Chris Anderson (@crandycodes) comes on to show us how to request and make use of resource tokens in Cosmos DB. Along the way, he also shows us some other interesting features in Azure App Service such as EasyAuth and Run-From-Zip deployment.
Take a look at the links below that point to code samples, documentation and the official announcements for the features:
The JWT is never validated. Anyone can generate a dummy JWT, and it will be accepted and exchanged for a valid CosmosDB resource token.
@Thomas Levesque: App Service's Authentication / Authorization (aka Easy Auth) feature does the Authentication/Verification of that JWT for us, so we don't need to manage the complexity of correctly verifying the JWT.
Easy Auth prevents spoofing of that header when it is turned on. If you don't turn it on, then yes you can spoof that JWT. Make sure you have Easy Auth turned on and you don't have to worry. You can add the verify logic for the JWT in there if you want to protect against Easy Auth being turned off accidentally, but it's not necessary otherwise.
Wouldn't be easier and just as fast to just to create an Azure Functions Web Api, secured by EasyAuth (Azure AD B2C)? Then you could place this in front of each region you deploy the cosmos db? Do you have any demo's of this scenario?
This approach is sufficient secure for Payment Gateway (Xamarin) app client?
@Niner810749: You could certainly do that, and that's often the best approach. This model is valuable if you need to provide direct access to Cosmos DB, but need to lock down the permissions you grant.
The token provider sample listed in the description is the main sample we have. We don't currently have any other video content demoing it.
@Jefferson: I can't speak to the payments gateway part, but this is sufficient to grant controlled access to mobile users.