-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(kerberos): fix typo in Kerberos connection section, and url
* Fix type in Kerberos connection section Partial NODE-1654 * Add missing backslash to URL
- Loading branch information
1 parent
3c9ef0d
commit bd80fb2
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,7 @@ For more information, refer to the MongoDB manual | |
|
||
[MongoDB Enterprise](http://www.mongodb.com/products/mongodb-enterprise) supports proxy authentication through a Kerberos service. The Node.js driver supports Kerberos on UNIX via the MIT Kerberos library and on Windows via the SSPI API. | ||
|
||
To connect using the X.509 authentication mechanism, specify ``authMechanism=GSSAPI`` as the mechanism in the [URI connection string](https://docs.mongodb.org/manual/reference/connection-string/). Specify the user principal and the service name in the connection string. Use `enodeURIComponent` to encode the user principal string. | ||
To connect using the GSSAPI authentication mechanism, specify ``authMechanism=GSSAPI`` as the mechanism in the [URI connection string](https://docs.mongodb.org/manual/reference/connection-string/). Specify the user principal and the service name in the connection string. Use `enodeURIComponent` to encode the user principal string. | ||
|
||
The following example connects to MongoDB using Kerberos for UNIX. | ||
|
||
|
@@ -179,7 +179,7 @@ const server = "mongo-server.example.com"; | |
const principal = "[email protected]"; | ||
const urlEncodedPrincipal = encodeURIComponent(principal); | ||
|
||
const url = `mongodb://${urlEncodedPrincipal}@${server}?authMechanism=GSSAPI&gssapiServiceName=mongodb`; | ||
const url = `mongodb://${urlEncodedPrincipal}@${server}/?authMechanism=GSSAPI&gssapiServiceName=mongodb`; | ||
|
||
const client = new MongoClient(url); | ||
|
||
|