Loading...
Searching...
No Matches
mongocxx::v1::oidc_credential Class Reference

`#include <mongocxx/v1/oidc_credential.hpp>`

## Description

The credential returned by an OIDC callback.

## Public Member Functions

| oidc_credential (oidc_credential &&other) noexcept
| Move constructor.
| oidc_credential (oidc_credential const &other)
| Copy construction.
| oidc_credential (std::string access_token)
| Construct a credential with an access token.
| oidc_credential (std::string access_token, std::chrono::milliseconds expires_in)
| Construct a credential with an access token and expiry duration.
| ~oidc_credential ()
| Destroy this object.
bsoncxx::v1::stdx::string_view | access_token () const
| Return the access token.
bsoncxx::v1::stdx::optional< std::chrono::milliseconds > | expires_in () const
| Return the optional expiry duration.
oidc_credential & | operator= (oidc_credential &&other) noexcept
| Move assignment.
oidc_credential & | operator= (oidc_credential const &other)
| Copy assignment.

## Constructor & Destructor Documentation

## ~oidc_credential()

mongocxx::v1::oidc_credential::~oidc_credential | ( |  | ) |

Destroy this object.

## oidc_credential() [1/4]

mongocxx::v1::oidc_credential::oidc_credential | ( | oidc_credential && | other | ) |

noexcept

Move constructor.

Postconditions:
  - other is in an assign-or-destroy-only state.

## oidc_credential() [2/4]

mongocxx::v1::oidc_credential::oidc_credential | ( | oidc_credential const & | other | ) |

Copy construction.

## oidc_credential() [3/4]

mongocxx::v1::oidc_credential::oidc_credential | ( | std::string | access_token | ) |

explicit

Construct a credential with an access token.

## oidc_credential() [4/4]

mongocxx::v1::oidc_credential::oidc_credential | ( | std::string | access_token,
|  | std::chrono::milliseconds | expires_in )

explicit

Construct a credential with an access token and expiry duration.

The expiry duration will be evaluated relative to the system clock immediately after the callback returns.

## Member Function Documentation

## access_token()

bsoncxx::v1::stdx::string_view mongocxx::v1::oidc_credential::access_token | ( |  | ) | const

Return the access token.

## expires_in()

bsoncxx::v1::stdx::optional< std::chrono::milliseconds > mongocxx::v1::oidc_credential::expires_in | ( |  | ) | const

Return the optional expiry duration.

## operator=() [1/2]

oidc_credential & mongocxx::v1::oidc_credential::operator= | ( | oidc_credential && | other | ) |

noexcept

Move assignment.

Postconditions:
  - other is in an assign-or-destroy-only state.

## operator=() [2/2]

oidc_credential & mongocxx::v1::oidc_credential::operator= | ( | oidc_credential const & | other | ) |

Copy assignment.

The documentation for this class was generated from the following file:

- mongocxx/v1/oidc_credential.hpp