# Generated by oapi-gen. DO NOT EDIT.
from __future__ import annotations

from dataclasses import dataclass
from typing import Protocol

from .._cookies import Cookie as Cookie


@dataclass(frozen=True, slots=True)
class BearerAuthSecurity:
    api_key: str
    roles: tuple[str, ...]


class SecurityRejected(Exception):
    """Signal that one security alternative was not accepted."""


class SecurityHandler(Protocol):
    async def handle_bearer_auth(
        self, context: object | None, operation_id: str, credential: BearerAuthSecurity
    ) -> object | None: ...
