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

NAME

6       mongoc_uri_set_mechanism_properties  - mongoc_uri_set_mechanism_proper‐
7       ties()
8

SYNOPSIS

10          bool
11          mongoc_uri_set_mechanism_properties (mongoc_uri_t *uri,
12                                               const bson_t *properties);
13

PARAMETERS

15       · uri: A mongoc_uri_t.
16
17       · properties: A bson_t .
18

DESCRIPTION

20       Replaces all the options in URI's "authMechanismProperties"  after  the
21       URI has been parsed from a string.
22

RETURNS

24       Returns false if the option cannot be set, for example if properties is
25       not valid BSON data.
26

EXAMPLE

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

SEE ALSO

44       GSSAPI (Kerberos) Authentication  and  mongoc_uri_get_mechanism_proper‐
45       ties
46

AUTHOR

48       MongoDB, Inc
49
51       2017-present, MongoDB, Inc
52
53
54
55
561.16.2                           Feb 25,M2O0N2G0OC_URI_SET_MECHANISM_PROPERTIES(3)
Impressum