"""{{ display_name }} MCP server — generated by mcpify. Do not hand-edit."""

from __future__ import annotations

from ..auth_strategy import AuthConfig, AuthStrategy, Credentials
from ..errors import MissingCredentialsError


class PatAuthStrategy(AuthStrategy):
    async def authenticate(self, config: AuthConfig) -> Credentials:
        token = config.get("token")
        if not token:
            raise MissingCredentialsError("token")
        return {"token": token, "authorization_header": f"Bearer {token}"}

    def validate_credentials(self, credentials: Credentials) -> bool:
        return bool(credentials.get("token"))
