MONGOC_OIDC_CREDENTIAL_T(3)
π MONGOC_OIDC_CREDENTIAL_T(3) π
okay so real quick bestie β this is a page from libmongoc, and today's main character is mongoc_oidc_credential_t. it's giving "small struct, big responsibility" and honestly? i'm obsessed. let's get into it. β¨
β¨ SYNOPSIS β¨
typedef struct _mongoc_oidc_credential_t mongoc_oidc_credential_t;
so like. what even is this thing? π¦ it represents the return value of a mongoc_oidc_callback_fn_t. that's it. that's the whole vibe.
and the way it works is lowkey iconic: this value gets returned by the mongoc_oidc_callback_fn_t that's stored inside an mongoc_oidc_callback_t object, and that happens when the callback gets invoked by an associated mongoc_client_t or mongoc_client_pool_t object. so it's a whole little ecosystem, yk? π«Ά
πΈ RETURN VALUES πΈ
here's the list of currently supported return values, no gatekeeping:
access_tokenβ Version 1 β the OIDC access token. πexpires_inβ Version 1 β an optional expiration duration (in milliseconds). β
and the "Version" column (yes the one in the original table, rip table, you ate tho π) tells you which OIDC callback API versions the parameter is applicable to.
π₯ Access Token
an OIDC access token β which is a signed JWT token. π
WARNING: access_token is NOT directly validated by the driver. not me finding out the driver just trusts you like that π fr fr, it does not check it. that's on you.
π§ Expiry Duration
an optional expiry duration (in milliseconds) for the access token. simple as that. π
IMPORTANT: an unset value is interpreted as an infinite expiry duration. so like... unset = forever = no cap, it never expires. set it if you want it to actually end, bestie. π
π SEE ALSO:
mongoc_oidc_callback_tmongoc_oidc_callback_fn_t
go read those next, iykyk π¦
π AUTHOR
MongoDB, Inc
π COPYRIGHT
2009-present, MongoDB, Inc.
and that's the whole page, periodt. π this lil masterpiece is libmongoc 2.5.6, dated Oct 09, 2026 β slay, mwah, bye bestie πβ¨
π¦ 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