MONGOC_OIDC_CREDENTIAL_NEW(3)

πŸ“¦
version 2.5.6 Β· 3 versions
, in epel 10

✨ MONGOC_OIDC_CREDENTIAL_NEW πŸ’…

okay so bestie, this is a page from libmongoc (that's the MongoDB C driver, iykyk) and it's about one tiny little function that makes you an OIDC credential. it's giving "small but mighty" fr fr 🫢


🌸 SYNOPSIS 🌸

mongoc_oidc_credential_t *
mongoc_oidc_credential_new (const char *access_token)

so what this does is it creates a brand new mongoc_oidc_credential_t object β€” and that object stores a copy of the OIDC access token you hand it, with an infinite expiry duration. no cap, it literally never expires πŸ’€

if an infinite expiry isn't the vibe and you actually want a finite expiry duration, that's a whole different function bestie β€” go use mongoc_oidc_credential_new_with_expires_in() instead. different tool for a different day ✨

⚠️ WARNING: access_token is NOT directly validated by the driver. like… at all. the driver is not doing a vibe check on this thing. it just takes it. so make sure you know what you're passing in, okay? πŸ™ˆ

πŸŽ€ PARAMETERS πŸŽ€

  • access_token β€” an OIDC access token. it must not be NULL. that's the one rule. don't come at it with NULL πŸ’…

πŸ¦‹ RETURNS πŸ¦‹

you get back a shiny new mongoc_oidc_credential_t ✨ β€” and listen, you have to free it with mongoc_oidc_credential_destroy() when you're done with it. it's not gonna clean up after itself, main character energy doesn't extend to memory management 🧚

or, if you gave it an invalid argument, you get NULL back. that's the "not me, not today" response 😭


πŸ‘€ SEE ALSO πŸ‘€

  • mongoc_oidc_credential_t β€” the object this whole thing is about, go read up on it πŸ“

πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” yes, that MongoDB πŸ’…

2009-present, MongoDB, Inc.


and that's the whole page, bestie!! no crumbs left 🌈 this was libmongoc version 2.5.6, dated Oct 09, 2026 β€” go forth and authenticate responsibly, mwah πŸŽ€πŸ’–πŸ‘‘

πŸ“¦ where this page comes from