diff --git a/src/codebase/controllers/token.py b/src/codebase/controllers/token.py index 9ba67f2..cce1dbb 100644 --- a/src/codebase/controllers/token.py +++ b/src/codebase/controllers/token.py @@ -72,6 +72,7 @@ def post(self): self.db.commit() self.success(data={ + "uid": str(user.uuid), "access_token": gen_token(user, expires_in), "expires_in": utc_rfc3339_string(expires_in), "refresh_token": session.refresh_token, @@ -119,6 +120,7 @@ def post(self): self.db.commit() self.success(data={ + "uid": str(user.uuid), "access_token": gen_token(user, expires_in), "expires_in": utc_rfc3339_string(expires_in), "refresh_token": session.refresh_token, @@ -171,6 +173,7 @@ def post(self): self.db.commit() self.success(data={ + "uid": str(user.uuid), "access_token": gen_token(user, expires_in), "expires_in": utc_rfc3339_string(expires_in), "refresh_token": session.refresh_token, @@ -224,6 +227,7 @@ def post(self): self.db.commit() self.success(data={ + "uid": str(user.uuid), "access_token": gen_token(user, expires_in), "expires_in": utc_rfc3339_string(expires_in), "refresh_token": session.refresh_token, diff --git a/src/codebase/schema.yml b/src/codebase/schema.yml index 0ae1bba..47a4a7a 100755 --- a/src/codebase/schema.yml +++ b/src/codebase/schema.yml @@ -613,10 +613,15 @@ definitions: ResponseTokenData: type: object required: + - uid - access_token - expires_in - refresh_token properties: + uid: + type: string + format: uuid + description: 用户 ID access_token: type: string description: jwt 格式的 token, 用户访问凭证