| MONGOC_OIDC_CALLBACK_PARAMS_GET_TIMEOUT(3) | libmongoc | MONGOC_OIDC_CALLBACK_PARAMS_GET_TIMEOUT(3) |
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¶
- •
- params: a mongoc_oidc_callback_params_t <>.
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:
- mongoc_oidc_callback_params_t <>
- mongoc_oidc_callback_t <>
- mongoc_oidc_callback_params_cancel_with_timeout() <>
Author¶
MongoDB, Inc
Copyright¶
2009-present, MongoDB, Inc.
| November 26, 2025 | 2.2.0 |