1MONGOC_URI_SET_USERNAME(3) libmongoc MONGOC_URI_SET_USERNAME(3)
2
3
4
6 bool
7 mongoc_uri_set_username (mongoc_uri_t *uri, const char *username);
8
10 • uri: A mongoc_uri_t.
11
12 • username: The new username.
13
15 Sets the URI's username, after the URI has been parsed from a string.
16 The driver authenticates with this username if the password is also
17 set.
18
20 Returns false if the option cannot be set, for example if username is
21 not valid UTF-8.
22
24 MongoDB, Inc
25
27 2017-present, MongoDB, Inc
28
29
30
31
321.25.1 Nov 08, 2023 MONGOC_URI_SET_USERNAME(3)