MONGOC_OIDC_C...WITH_USER_DATA(3)
π MONGOC_OIDC_C...WITH_USER_DATA(3) π
okay so bestie, this one's a page from libmongoc (that's the MongoDB C driver, mwah) and it's the whole tea on mongoc_oidc_callback_new_with_user_data π
. It's a lil constructor function, it's giving "build me a callback wrapper" and honestly? iconic behavior.
β¨ SYNOPSIS β¨
mongoc_oidc_callback_t *
mongoc_oidc_callback_new_with_user_data (mongoc_oidc_callback_fn_t fn, void *user_data)
So what it does is make you a brand-new mongoc_oidc_callback_t object, and that object stores two things: the OIDC callback function you hand it, and a pointer to your user data. Literally just wrapping them up together like a little gift π.
β οΈ WARNING, and I mean it fr fr: the lifetime of the object thatuser_datapoints to? That's on you, the user β it is NOT managed by themongoc_oidc_callback_t! Like, mongoc is not gonna babysit it, it is not gonna free it for you, that pointer is your responsibility, no cap. π«Ά
πΈ PARAMETERS πΈ
fnβ amongoc_oidc_callback_fn_t. Must not beNULL. (It's mandatory, bestie, non-negotiable π)user_dataβ a pointer to your user data, orNULL. Either one is valid here, so no pressure β¨
π RETURNS π
You get back a shiny new mongoc_oidc_callback_t that you must free with mongoc_oidc_callback_destroy(). Or, if you gave it an invalid argument, you get NULL β so like, do check that, okay? π
π¦ SEE ALSO π¦
mongoc_oidc_callback_tmongoc_oidc_callback_new()
(yes, there's a non-user-data version too, go treat yourself, read both π)
π AUTHOR π
MongoDB, Inc. β the whole entire company, slaying as always π
β COPYRIGHT β
2009-present, MongoDB, Inc. β periodt.
and that's the whole page, bestie! this era of the docs is libmongoc version 2.5.6, dated Oct 09, 2026 β screenshot it, cite it, live ur truth π§πβ¨
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms