Skip to content

Commit 6094b72

Browse files
authored
DOCSP-50222: Reorganize auth pages (#266)
* DOCSP-50222: Reorganize auth pages * edits * fix * snooty
1 parent 90a66cc commit 6094b72

File tree

6 files changed

+562
-351
lines changed

6 files changed

+562
-351
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ toc_landing_pages = [
2828
"/indexes",
2929
"/security",
3030
"/upgrade",
31+
"/security/authentication",
3132
]
3233

3334
sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"

source/includes/authentication.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
require __DIR__ . '/../vendor/autoload.php';
44

5+
// start-default-client
6+
$uriOptions = [
7+
'username' => '<username>',
8+
'password' => '<password>',
9+
'authSource' => '<authentication database>',
10+
];
11+
12+
$client = new MongoDB\Client(
13+
'mongodb://<hostname>:<port>',
14+
$uriOptions,
15+
);
16+
// end-default-client
17+
18+
// start-default-uri
19+
$uri = 'mongodb://<username>:<password>@<hostname>:<port>/?authSource=admin';
20+
$client = new MongoDB\Client($uri);
21+
// end-default-uri
22+
523
// start-scram-sha-256-client
624
$uriOptions = [
725
'username' => '<username>',

0 commit comments

Comments
 (0)