update
This commit was merged in pull request #2.
This commit is contained in:
@@ -30,6 +30,9 @@ class Config:
|
|||||||
JWT_REFRESH_TOKEN_EXPIRES = os.getenv(
|
JWT_REFRESH_TOKEN_EXPIRES = os.getenv(
|
||||||
"JWT_REFRESH_TOKEN_EXPIRES", timedelta(days=30)
|
"JWT_REFRESH_TOKEN_EXPIRES", timedelta(days=30)
|
||||||
)
|
)
|
||||||
|
JWT_TOKEN_LOCATION = ["headers"]
|
||||||
|
JWT_HEADER_NAME = "Authorization"
|
||||||
|
JWT_HEADER_TYPE = "Bearer"
|
||||||
|
|
||||||
KAFKA_BROKER = 'dev-events.simbrellang.net:9085'
|
KAFKA_BROKER = 'dev-events.simbrellang.net:9085'
|
||||||
KAFKA_PAYMENT_TOPIC = 'PROCESS_PAYMENT'
|
KAFKA_PAYMENT_TOPIC = 'PROCESS_PAYMENT'
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"Authentication"
|
||||||
|
],
|
||||||
|
"summary": "User login",
|
||||||
|
"description": "Authenticate a user and return a JWT token",
|
||||||
|
"operationId": "login",
|
||||||
|
"requestBody": {
|
||||||
|
"description": "User credentials",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/LoginRequest.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/LoginResponse.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Invalid username or password"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "digifiuser"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "digifipass"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["username", "password"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"jwt_token": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWdpZml1c2VyIiwibmFtZSI6ImJhY2tvZmZpY2UgdXNlciIsImlhdCI6MTUxNjIzOTAyMn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "backoffice user"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user