You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/06/07 20:30:23 UTC

[GitHub] [couchdb-documentation] jaydoane commented on a change in pull request #666: Document the new {"auth": {"basic": ...}} replicator basic auth format

jaydoane commented on a change in pull request #666:
URL: https://github.com/apache/couchdb-documentation/pull/666#discussion_r646917756



##########
File path: src/replication/replicator.rst
##########
@@ -696,3 +728,71 @@ The syntax for a selector is the same as the
 Using a selector is significantly more efficient than using a JavaScript
 filter function, and is the recommended option if filtering on document
 attributes only.
+
+Specifying Usernames and Passwords
+===================================
+
+There are multiple ways to specify usernames and passwords for replication endpoints:
+
+ - In an ``{"auth": {"basic": ...}}`` object:
+
+    .. versionadded:: 3.2.0
+
+    .. code-block:: javascript
+
+        {
+            "target": {
+                "url": "http://someurl.com/mydb",
+                "auth": {
+                    "basic": {
+                        "username": "$username",
+                        "password": "$password"
+                     }
+                }
+            },
+            ...
+        }
+
+    This is the prefererred format as it allows including characters like ``@``, ``:``
+    and others in the username and password fields.
+
+ - In the userinfo part of the endpoint URL. This allows for a more compact

Review comment:
       I wonder if it's worth mentioning that URLs of this format are obsolete? Also, should we deprecate this format when using auth?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org