Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit c0b9e9c

Browse files
committed
Update README and fix a return class
1 parent f8e96a2 commit c0b9e9c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,23 @@
44

55
This is a Fastapi application interfacing with a postgres database. It is designed to be deployed behind
66
Nginx on a kubernetes cluster.
7+
8+
## Creating a token
9+
10+
Assuming you are running locally on localhost:8000
11+
12+
1. Login in to the api via [http://localhost:8000/security/login](http://localhost:8000/security/login)
13+
14+
2. Grab a security token via POST [http://localhost:8000/docs#/security/create_group_token_security_token_post](http://localhost:8000/docs#/security/create_group_token_security_token_post)
15+
16+
Set the group_id to 1 ( admin group ) and the expiration to the future ( 1832530128 = 2028-01-26 )
17+
18+
## Creating a token
19+
20+
Assuming you are running locally on localhost:8000
21+
22+
1. Login in to the api via [http://localhost:8000/security/login](http://localhost:8000/security/login)
23+
24+
2. Grab a security token via POST [http://localhost:8000/docs#/security/create_group_token_security_token_post](http://localhost:8000/docs#/security/create_group_token_security_token_post)
25+
26+
Set the group_id to 1 ( admin group ) and the expiration to the future ( 1832530128 = 2028-01-26 )

api/routes/security.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class User(BaseModel):
4646
disabled: bool | None = None
4747

4848
class AccessToken(BaseModel):
49-
group: str
49+
group: int
5050
token: str
5151

5252
class GroupTokenRequest(BaseModel):

0 commit comments

Comments
 (0)