Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track logged-in user and change password #913

Merged
merged 13 commits into from
Jan 30, 2025
Merged

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

111 changes: 111 additions & 0 deletions backend/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,57 @@
}
}
},
"/api/user/change-password": {
"post": {
"tags": [
"authentication"
],
"summary": "Change password endpoint, updates a user password",
"operationId": "change_password",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChangePasswordRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "The current user name and id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginResponse"
}
}
}
},
"401": {
"description": "Invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/user/login": {
"post": {
"tags": [
Expand Down Expand Up @@ -1053,6 +1104,47 @@
}
}
}
},
"/api/user/whoami": {
"get": {
"tags": [
"authentication"
],
"summary": "Change password endpoint, updates a user password",
"operationId": "whoami",
"responses": {
"200": {
"description": "The current user name and id",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginResponse"
}
}
}
},
"401": {
"description": "Invalid user session",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -1227,6 +1319,25 @@
}
}
},
"ChangePasswordRequest": {
"type": "object",
"required": [
"username",
"password",
"new_password"
],
"properties": {
"new_password": {
"type": "string"
},
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"Credentials": {
"type": "object",
"required": [
Expand Down
Loading