This document describes the API and its endpoints, including authentication and integration with AWS services like S3.
- AWS keys are needed and are stored in a
.env
file. - Docker is used for development. Run
docker-compose up
to start the application.
JWT is used for authentication. The token should be included in the Authorization
header with the format Bearer {Your-Token}
.
- Endpoint:
POST /register
- Response Type: JSON
username
: Stringpassword
: String
- 201 Created
- 400 Username already exists
- Endpoint:
POST /login
- Response Type: JSON
username
: Stringpassword
: String
- 200 OK
- 401 Unauthorized
- Endpoint:
POST /store-sensitive-data
- Response Type: JSON
Authorization
: Bearer Token
credit_card_number
: String
- 200 OK
- 401 Unauthorized
- Endpoint:
GET /retrieve-sensitive-data
- Response Type: JSON
Authorization
: Bearer TokenUnique-Token
: Unique token generated when storing sensitive data
- 200 OK
- 401 Unauthorized
- 404 Data Not Found
- Endpoint:
PUT /update-credentials
- Response Type: JSON
Authorization
: Bearer Token
current_password
: Stringnew_username
: String (Optional)new_password
: String (Optional)
- 200 OK
- 401 Unauthorized
- Endpoint:
POST /upload-profile-picture
- Response Type: JSON
Authorization
: Bearer Token
file
: File
- 200 OK
- 500 Internal Server Error
- Endpoint:
GET /get-profile-picture
- Response Type: JSON
Authorization
: Bearer Token
- 200 OK
- 500 Internal Server Error
- Bucket Name:
profile-pictures-techtest
- AWS keys are needed for S3 and are loaded from a
.env
file.