-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from Tauffer-Consulting/feat/token-expiry
Token expiration date
- Loading branch information
Showing
12 changed files
with
154 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,9 @@ interface IPostAuthRegisterParams { | |
} | ||
|
||
interface IPostAuthRegisterResponseInterface { | ||
id: string; | ||
user_id: string; | ||
email: string; | ||
token_expires_in: number; | ||
groups: Array<{ group_id: number; group_name: string }>; | ||
} | ||
|
||
|
@@ -27,7 +28,8 @@ export const postAuthRegister: ( | |
|
||
export const postAuthRegisterMockResponse: IPostAuthRegisterResponseInterface = | ||
{ | ||
id: "some_id", | ||
user_id: "some_id", | ||
email: "[email protected]", | ||
token_expires_in: 3600, | ||
groups: [{ group_id: 0, group_name: "some group" }], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
from pydantic import BaseModel | ||
from typing import List | ||
|
||
# # Base Models | ||
# class UserGroupBase(BaseModel): | ||
# group_id: int | ||
# group_name: str | ||
|
||
# Responses Models | ||
class LoginResponse(BaseModel): | ||
user_id: int | ||
email: str | ||
workspaces_ids: List[int] | ||
access_token: str | ||
token_expires_in: int | ||
|
||
class RegisterResponse(BaseModel): | ||
id: int | ||
user_id: int | ||
email: str | ||
workspaces_ids: List[int] | ||
access_token: str | ||
token_expires_in: int |
Oops, something went wrong.