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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class AzureCertificateAuth(UniversalBaseModel):
    """
    Azure Entra certificate based auth
    """

    type: typing.Literal["certificate"] = pydantic.Field(default="certificate")
    """
    +value=certificate
    """

    tenant_id: str = pydantic.Field()
    """
    The Azure AD tenant ID where the application is registered
    """

    client_id: str = pydantic.Field()
    """
    The Azure AD application (client) ID for service principal authentication
    """

    certificate: str = pydantic.Field()
    """
    The certificate in PEM format
    """

    certificate_thumbprint: str = pydantic.Field()
    """
    The base64url-encoded SHA-1 thumbprint of the certificate (x5t claim)
    """

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

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