# `auth_oidc` – MONGODB-OIDC Authentication

MONGODB-OIDC Authentication helpers.

class pymongo.auth_oidc.OIDCCallback

  A base class for defining OIDC callbacks.

  abstractmethod fetch(context)

    Convert the given BSON value into our own type.

    Parameters:

      context (OIDCCallbackContext)

    Return type:

      OIDCCallbackResult

class pymongo.auth_oidc.OIDCCallbackContext(timeout_seconds: 'float', username: 'str', version: 'int', refresh_token: 'Optional[str]' = None, idp_info: 'Optional[OIDCIdPInfo]' = None)
  Parameters:

    - timeout_seconds (float)

    - username (str)

    - version (int)

    - refresh_token (str | None)

    - idp_info (OIDCIdPInfo | None)

class pymongo.auth_oidc.OIDCCallbackResult(access_token: 'str', expires_in_seconds: 'Optional[float]' = None, refresh_token: 'Optional[str]' = None)
  Parameters:

    - access_token (str)

    - expires_in_seconds (float | None)

    - refresh_token (str | None)

class pymongo.auth_oidc.OIDCIdPInfo(issuer: 'str', clientId: 'Optional[str]' = None, requestScopes: 'Optional[list[str]]' = None)
  Parameters:

    - issuer (str)

    - clientId (str | None)

    - requestScopes (list[str] | None)