Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
返回 uid 值
Browse files Browse the repository at this point in the history
  • Loading branch information
gwind committed Feb 2, 2019
1 parent cd19ab3 commit d52a680
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/codebase/controllers/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions src/codebase/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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, 用户访问凭证
Expand Down

0 comments on commit d52a680

Please sign in to comment.