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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class McpServerOAuth2JwtSource(enum.StrEnum):
    """
    Source of the JWT token to be used for verification.
    """

    ACCESS_TOKEN = "access_token"
    ID_TOKEN = "id_token"

    def visit(self, access_token: typing.Callable[[], T_Result], id_token: typing.Callable[[], T_Result]) -> T_Result:
        if self is McpServerOAuth2JwtSource.ACCESS_TOKEN:
            return access_token()
        if self is McpServerOAuth2JwtSource.ID_TOKEN:
            return id_token()
