Rename directories
This commit is contained in:
parent
c55acba709
commit
ca047c4248
95 changed files with 77 additions and 77 deletions
35
Documentation/Tech-docs/api/services/auth_service.md
Normal file
35
Documentation/Tech-docs/api/services/auth_service.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Auth Service
|
||||
|
||||
### *class* services.auth_service.AuthService(translations: Translations = Depends(translations_dependency))
|
||||
|
||||
Bases: `object`
|
||||
|
||||
Сервис для регистрации, авторизации и управления сессиями
|
||||
|
||||
#### create_access_token(data: dict) → str
|
||||
|
||||
Создаёт токен
|
||||
|
||||
#### get_current_user(token: str = Depends(OAuth2PasswordBearer)) → UserResponse
|
||||
|
||||
Получает текущего пользователя по токену
|
||||
|
||||
#### get_user_by_session(client_id: str) → dict
|
||||
|
||||
Получает пользователя и токен по client_id
|
||||
|
||||
#### login(user: UserLogin, client_id: str) → dict
|
||||
|
||||
Авторизует пользователя, создаёт сессию и возвращает токен
|
||||
|
||||
#### logout(client_id: str)
|
||||
|
||||
Выполняет выход из системы, удаляя последнюю сессию для client_id
|
||||
|
||||
#### register(user: UserCreate) → UserResponse
|
||||
|
||||
Регистрирует нового пользователя
|
||||
|
||||
#### verify_token(token: str) → dict | None
|
||||
|
||||
Проверяет токен
|
||||
Loading…
Add table
Add a link
Reference in a new issue