1MONGOC_URI_SET_MECHANISM_PROPERTIES(l3i)bmonMgOoNcGOC_URI_SET_MECHANISM_PROPERTIES(3)
2
3
4

SYNOPSIS

6          bool
7          mongoc_uri_set_mechanism_properties (mongoc_uri_t *uri,
8                                               const bson_t *properties);
9

PARAMETERS

11uri: A mongoc_uri_t.
12
13properties: A bson_t .
14

DESCRIPTION

16       Replaces  all  the options in URI's "authMechanismProperties" after the
17       URI has been parsed from a string.
18

RETURNS

20       Returns false if the option cannot be set, for example if properties is
21       not valid BSON data.
22

EXAMPLE

24          mongoc_uri_t *uri;
25          bson_t props = BSON_INITIALIZER;
26
27          uri = mongoc_uri_new (
28             "mongodb://user%40DOMAIN.COM:password@localhost/?authMechanism=GSSAPI"
29             "&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true");
30
31          /* replace all options: replace service name "other" with "my_service", unset
32           * "CANONICALIZE_HOST_NAME" and accept its default.
33           */
34          BSON_APPEND_UTF8 (&props, "SERVICE_NAME", "my_service");
35          mongoc_uri_set_mechanism_properties (uri, &props);
36
37          bson_destroy (&props);
38

AUTHOR

40       MongoDB, Inc
41
43       2017-present, MongoDB, Inc
44
45
46
47
481.25.1                           Nov 08,M2O0N2G3OC_URI_SET_MECHANISM_PROPERTIES(3)
Impressum