/
mkudmi
/
gigaspec-kit
Обзор
Документация
Войти
/
mkudmi
/
gigaspec-kit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/specify_cli/authentication/github.py
24 строки
718 B
Copilot
feat: Config-driven opt-in authentication registry with multi-platform support (#2393)
07 май 2026, 20:51
Не верифицирован
07 май 2026, 20:51
f099834
Код
Авторство
О чём код?
"""GitHub authentication provider.""" from __future__ import annotations from .base import AuthProvider class GitHubAuth(AuthProvider): """GitHub authentication provider. Supports the ``bearer`` auth scheme, used for PATs, fine-grained PATs, OAuth tokens, and GitHub App installation tokens. """ key = "github" supported_auth_schemes = ("bearer",) def auth_headers(self, token: str, auth_scheme: str) -> dict[str, str]: """Return ``Authorization: Bearer <token>``.""" if auth_scheme != "bearer": raise ValueError( f"GitHubAuth does not support auth scheme {auth_scheme!r}" ) return {"Authorization": f"Bearer {token}"}