Reapply "Merge branch 'main' of https://github.com/GooGuTeam/osu_lazer_api"
This reverts commit 68701dbb1d.
This commit is contained in:
29
app/models/oauth.py
Normal file
29
app/models/oauth.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# OAuth 相关模型
|
||||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class TokenRequest(BaseModel):
|
||||
grant_type: str
|
||||
username: str | None = None
|
||||
password: str | None = None
|
||||
refresh_token: str | None = None
|
||||
client_id: str
|
||||
client_secret: str
|
||||
scope: str = "*"
|
||||
|
||||
|
||||
class TokenResponse(BaseModel):
|
||||
access_token: str
|
||||
token_type: str = "Bearer"
|
||||
expires_in: int
|
||||
refresh_token: str
|
||||
scope: str = "*"
|
||||
|
||||
|
||||
class UserCreate(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
email: str
|
||||
country_code: str = "CN"
|
||||
Reference in New Issue
Block a user