mockapi/app/modules/oauth2/__init__.py
2026-03-16 09:00:26 +00:00

76 lines
No EOL
1.5 KiB
Python

"""OAuth2 module for authentication and authorization."""
from .schemas import (
OAuthClientBase,
OAuthClientCreate,
OAuthClientUpdate,
OAuthClientResponse,
OAuthTokenBase,
OAuthTokenCreate,
OAuthTokenUpdate,
OAuthTokenResponse,
OAuthUserBase,
OAuthUserCreate,
OAuthUserUpdate,
OAuthUserResponse,
)
from .repositories import (
OAuthClientRepository,
OAuthTokenRepository,
OAuthUserRepository,
)
from .services import (
TokenService,
OAuthService,
ClientService,
ScopeService,
)
from .auth_code_store import authorization_code_store
from .dependencies import (
get_current_token_payload,
get_current_token_scopes,
require_scope,
require_any_scope,
require_all_scopes,
)
from .controller import router as oauth_router
__all__ = [
# Schemas
"OAuthClientBase",
"OAuthClientCreate",
"OAuthClientUpdate",
"OAuthClientResponse",
"OAuthTokenBase",
"OAuthTokenCreate",
"OAuthTokenUpdate",
"OAuthTokenResponse",
"OAuthUserBase",
"OAuthUserCreate",
"OAuthUserUpdate",
"OAuthUserResponse",
# Repositories
"OAuthClientRepository",
"OAuthTokenRepository",
"OAuthUserRepository",
# Services
"TokenService",
"OAuthService",
"ClientService",
"ScopeService",
# Store
"authorization_code_store",
# Dependencies
"get_current_token_payload",
"get_current_token_scopes",
"require_scope",
"require_any_scope",
"require_all_scopes",
# Router
"oauth_router",
]