I tested basic auth against SG master
User was defined in the sync gateway.json
"users": {
"GUEST": {"disabled": true, "admin_channels": []},
"crashtest": {"disabled": false, "password":"crashtest",
"admin_channels": ["*"]}
}
I tried using the base64 command on MAC OS X to encode
'crashtest:crashtest' but this gave an incompatible encoded string.
I then used this online encoder <https://www.base64encode.org>
Which gave 'Y3Jhc2h0ZXN0OmNyYXNodGVzdA=='
I used the following curl:
curl -X GET -H "Authorization: Basic Y3Jhc2h0ZXN0OmNyYXNodGVzdA=="
http://localhost:4984/db/doc1
{"_id":"doc1","_rev":"1-cd809becc169215072fd567eebd8b8de","foo":"bar"}
Using an invalid encoded string should give the response:
{"error":"Unauthorized","reason":"Login required"}
You could validate this by using an invalid base64 encoded value.
Generally {"error":"Forbidden","reason":"forbidden"} indicates that your
user does not have access to the requested document (via channel access)
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/93a7b1c3-2f83-4e01-af0e-d7f820aea0a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.