table of contents
| MONGOC_OIDC_CREDENTIAL_NEW_WITH_EXPIRES_IN(3) | libmongoc | MONGOC_OIDC_CREDENTIAL_NEW_WITH_EXPIRES_IN(3) |
SYNOPSIS¶
mongoc_oidc_credential_t * mongoc_oidc_credential_new_with_expires_in (const char *access_token, int64_t expires_in)
Create a new mongoc_oidc_credential_t <> object which stores a copy of the provided OIDC access token and its expiry duration (in milliseconds).
The expiry duration will be evaluated relative to the value returned by System Clock <https://www.mongoc.org/libbson/current/bson_get_monotonic_time.html> immediately after the callback function has returned.
To set an infinite expiry duration, use mongoc_oidc_credential_new() <>.
Warning:
PARAMETERS¶
- access_token: an OIDC access token. Must not be NULL.
- expires_in: a non-negative integer.
RETURNS¶
A new mongoc_oidc_credential_t <> that must be freed with mongoc_oidc_credential_destroy() <>, or NULL when an invalid argument was given.
See also:
- •
- mongoc_oidc_credential_t <>
Author¶
MongoDB, Inc
Copyright¶
2009-present, MongoDB, Inc.
| November 26, 2025 | 2.2.0 |