# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from .connection_options_common import ConnectionOptionsCommon
from .connection_set_user_root_attributes_enum import ConnectionSetUserRootAttributesEnum
from .connection_upstream_params import ConnectionUpstreamParams


class ConnectionOptionsOAuth1Common(ConnectionOptionsCommon):
    client_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    OAuth 1.0 client identifier issued by the identity provider during application registration. This value identifies your Auth0 connection to the identity provider.
    """

    client_secret: typing.Optional[str] = pydantic.Field(default=None)
    """
    OAuth 1.0 client secret issued by the identity provider during application registration. Used to authenticate your Auth0 connection when signing requests and exchanging request tokens and verifiers for access tokens. May be null for public clients.
    """

    set_user_root_attributes: typing.Optional[ConnectionSetUserRootAttributesEnum] = None
    upstream_params: typing.Optional[ConnectionUpstreamParams] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
