mongoc_oidc_callback_params_get_timeout - Man Page

Synopsis

const int64_t *
mongoc_oidc_callback_params_get_timeout (const mongoc_oidc_callback_params_t *params);

Return a value comparable with System Clock <https://www.mongoc.org/libbson/current/bson_get_monotonic_time.html> to determine when a timeout must occur.

The return value is an absolute time point, not a duration. A callback can signal a timeout error using mongoc_oidc_callback_params_cancel_with_timeout() <>. Example:

mongoc_oidc_credential_t *
example_callback_fn (mongoc_oidc_callback_params_t *params) {
   const int64_t *timeout = mongoc_oidc_callback_params_get_timeout (params);

   // NULL means "infinite" timeout.
   if (timeout && bson_get_monotonic_time () > *timeout) {
      return mongoc_oidc_callback_params_cancel_with_timeout (params);
   }

   // ... your code here ...
}

A NULL (unset) return value means "infinite" timeout.

Parameters

Returns

A value comparable with System Clock <https://www.mongoc.org/libbson/current/bson_get_monotonic_time.html>, or NULL.

Lifecycle

The pointed-to int64_t is only valid for the duration of the invocation of the OIDC callback function.

See also:

Author

MongoDB, Inc

Info

Mar 04, 2026 2.2.3 libmongoc