feat(auth): support trusted device (#52)
New API to maintain sessions and devices:
- GET /api/private/admin/sessions
- DELETE /api/private/admin/sessions/{session_id}
- GET /api/private/admin/trusted-devices
- DELETE /api/private/admin/trusted-devices/{device_id}
Auth:
web clients request `/oauth/token` and `/api/v2/session/verify` with `X-UUID` header to save the client as trusted device.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -68,7 +68,7 @@ from .user_account_history import (
|
||||
UserAccountHistoryType,
|
||||
)
|
||||
from .user_login_log import UserLoginLog
|
||||
from .verification import EmailVerification, LoginSession
|
||||
from .verification import EmailVerification, LoginSession, LoginSessionResp, TrustedDevice, TrustedDeviceResp
|
||||
|
||||
__all__ = [
|
||||
"APIUploadedRoom",
|
||||
@@ -96,6 +96,7 @@ __all__ = [
|
||||
"ItemAttemptsCount",
|
||||
"ItemAttemptsResp",
|
||||
"LoginSession",
|
||||
"LoginSessionResp",
|
||||
"MeResp",
|
||||
"MonthlyPlaycounts",
|
||||
"MultiplayerEvent",
|
||||
@@ -131,6 +132,8 @@ __all__ = [
|
||||
"TeamMember",
|
||||
"TeamRequest",
|
||||
"TotpKeys",
|
||||
"TrustedDevice",
|
||||
"TrustedDeviceResp",
|
||||
"User",
|
||||
"UserAccountHistory",
|
||||
"UserAccountHistoryResp",
|
||||
|
||||
Reference in New Issue
Block a user