Hyperledger Composer Rest Server connection with Cloudant
Hyperledger Composer Rest Server connection with Cloudant
I'm trying to use Cloudant NoSQL DB as a persistent data source for my blockchain identities in my composer rest server. I have the composer-rest server setup in multiuser mode and is using google OAuth for authentication.
I have looked at this question (Hyperledger Composer Rest Server connection with Cloudant NoSQL DB) but I'm still experiencing problems.
If I do a composer card list in my terminal I can see the cards in my cloudant database. However, if I do a http get method from my rest server it returns an empty array.
I have the COMPOSER_DATSOURCES variable set to
{"db": { "name": "db", "connector": "cloudant", "username": "83bcdcfc-327b-xxxxxxxxxxxxx4e0ba4a9-bluemix", "password": "01e6d7xxxxxxxxxxxxxxxxb29adcc85ab35ce9ba", "database": "wallet" } }
In cloudant, I have one database called wallet in which there are a few different documents:
1) a cards document which contains all the business network identities
2) a number of client-data documents - one for each of the cards
When I do /auth/google on my REST server a few authentication documents are added to my wallet database - Is that working as expected? I thought the authentication data was meant to be stored in the browser?
Does anyone know why I can't see my business network cards when I do a http GET wallet method on my composer-rest-server?
Any help is greatly appreciated!
client-data
See tutorial hyperledger.github.io/composer/latest/tutorials/… for more examples of using Google Auth
– Paul O'Mahony
Jul 2 at 17:12
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
All information regarding authenticated users and their wallets (containing that users business network cards (that include identity) when multiple user mode is enabled) is persisted in a persistent data source (such as that which you've configured).
client-data
is like a working cache (where certificates/keys etc that are retrieved are stored). Your REST client is where authentication occurs (or invoked eg using the access token that's stored locally) and also the REST client is where you would initially have imported the card (using /Wallet/import endpoint) - your /GET call would show this– Paul O'Mahony
Jul 2 at 17:12