- 
                Notifications
    
You must be signed in to change notification settings  - Fork 50
 
Description
I was wondering if the following is possible (if it makes sense at all):
- Authorizing at an API using Digest-Auth (only authorizing)
 - Using the JS-Fetch-Api for the GET/PUT/POST Requests and Responses, using the authorized header information from digest-auth-request?
 
As an alternative: I guess it's not very wise to make each and every API Call (let's say, a few per minute from one user) through this package and always re-authorize?
The background of this question is, that I want to create a React Native iOS App, connected to my Shopware system. Through the app it should be possible to control the backend of the shop (e.g. place orders, edit products... all not a big deal since there is a rich API for Shopware).
I already managed to modify this npm for...
- working inside React Native and
 - create a GET-Request through the plugin (successful auth) and calling the Shop API with the returned Auth-Header-Info through the (way more native and, I guess, faster) Fetch-API.
Just one issue I was facing there was, that the URL needed to be the same for the Auth-Call and all other calls, probably because the Auth-Response isn't the same if not? 
As you can see, (Digest-)Auth and also JS in some parts is pretty new for me. Would be very helpful if you could just quickly give me a short answer if my goal from above is doable. I already wrapped my head intensely around your package code, which helped to understand, but not completely.
The Docs for the API are (as almost always) for PHP usage and the Client they create is really powerful yet complicated. But it can handle the exact situation I'm describing.... just as a side note (https://developers.shopware.com/developers-guide/rest-api/).
Thanks, Ben