@@ -156,14 +156,20 @@ var Cloudant = require('@cloudant/cloudant');
156156var cloudant = Cloudant (" http://MYUSERNAME:MYPASSWORD@localhost:5984" );
157157~~~
158158
159- ** Note** : If you pass credentials in the user information subcomponent of the URL
160- then they must be [ percent encoded] ( https://tools.ietf.org/html/rfc3986#section-3.2.1 ) .
161- Specifically the characters ` : / ? # [ ] @ % ` _ MUST_ be precent-encoded, other
162- characters _ MAY_ be percent encoded.
159+ ** Note** : It is preferred to pass credentials using the ` account ` /` username ` and
160+ ` password ` configuration options rather than as part of the URL. However, if you
161+ choose to pass credentials in the user information subcomponent of the URL then
162+ they must be [ percent encoded] ( https://tools.ietf.org/html/rfc3986#section-3.2.1 ) .
163+ Specifically within either the username or passowrd the characters ` : / ? # [ ] @ % `
164+ _ MUST_ be precent-encoded, other characters _ MAY_ be percent encoded.
165+ For example for the username ` user123 ` and password ` colon:at@321 ` :
166+ ```
167+ https://user123:colon%3aat%40321@localhost:5984
168+ ```
163169Credentials must not be percent encoded when passing them via other configuration
164170options besides ` url ` .
165171
166- ** Note ** : If you pass in a ` username ` , ` password ` , and ` url ` that contains
172+ If you pass in ` username ` and ` password ` options and a ` url ` that contains
167173credentials, the ` username ` and ` password ` will supercede the credentials within
168174the ` url ` . For example, ` myusername ` and ` mypassword ` will be used in the code
169175below during authentication:
0 commit comments