Do not follow this link

~jae/dn0magik-mc

60966b3a — Jae Lo Presti (DN0) 2 years ago beep
CI: add build
417d1a47 — Jae Lo Presti (DN0) 2 years ago
Merge "media-api" into "beep"

Squashed commit of the following:

commit d0e3e13babd856ddd2ea9ee0fd39b7e6cc6fa703
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 08:07:57 2022 +0300

    README: add new endpoints to the working

commit 0f3deb34d1d338128b3b0456b1fce296597b70b5
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 08:05:36 2022 +0300

    Media: add handling of skin from URL upload

    Additions:
     - /minecraft/profile/skins skin from URL upload

    Fixes:
     - /minecraft/profile/skins use lowercase for "skin" in temp folder

commit b9c82efb3bfb241dd1ee8cb7e86a1180b784ac5d
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 07:58:01 2022 +0300

    Requirements: add new dependency (requests)

commit c8d3fbedd308fafd31384ddbd979838d41063d93
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 07:55:28 2022 +0300

    Media: upload skin endpoint

    Fixes:
     - upload_file() get UUID from player username

    Additions:
     - is_file_allowed() returns if an uploaded file is allowed on the
       server
     - check_temp_folder() creates all the temp dirs
     - /minecraft/profile/skins skin upload endpoint

commit f184b9d61c9ca5b9870f847aa29a0d9e2540de8b
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 07:38:08 2022 +0300

    Media: add delete skin method & endpoint

    Additions:
     - delete_file() method to delete files from storage pool
     - remove_skin_from_player() method to delete reset player skin
     - /minecraft/profile/skins/active endpoint to reset player skin

commit d446632c81c9dfa0f39eb2fcd7e4359a8ebb46ec
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 07:28:01 2022 +0300

    MediaAPI: add cape profile endpoint

    Additions:
     - /minecraft/profile/capes/active endpoint

commit 6149513f5055ecde59e85a368bafa26750f5f9b5
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 01:43:20 2022 +0300

    Media: cache values for hashes

commit b680adb58b5a04d078731d8fcc02f00d4119b6d4
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 01:40:04 2022 +0300

    Media: add cape handling

    Additions:
     - get_player_cape() method to retreive cape hash
     - generate_user_profile() now uses the selected user cape

    Fixes:
     - upload_file() now uses the cape or skin path depending on type

commit 978a477c146bca12c5b1bc7a23aaa5434a7e6e2e
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 01:32:08 2022 +0300

    API: add mediaapi & related methods

    Additions:
     - Base media API file
     - get_player_skin() method that returns the file hash
     - generate_user_profile() now uses the real player skin

commit 8367b86be3194ffdcb7e815baf5a2f9dfae4722b
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 01:17:31 2022 +0300

    Mediautil: add method & remove temp file

    Additions:
     - download_file() method that downloads to tmp location

    Fixes:
     - Remove temp file on upload_file() call

commit 0bcbe7cc9497b5ac794807a259e5b5f70f939883
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 01:11:29 2022 +0300

    Utils: add basic mediautil file

    Additions:
     - get_hash() -> Generates sha-1 hash from file
     - upload_file() -> Uploads the file to the s3 bucket with {hash}.png

commit 49e82db8dc4b6eec7865d560eb8efec9afcdcfd3
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 00:59:48 2022 +0300

    Requirements: add storage API requirement (boto3)

commit 35411a63c581f58f0b4ad6f40e53058de8ea8041
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 00:54:34 2022 +0300

    DB: add media class to ORM file

commit efa69b8154741bcf3f141f5c1ca61a0d25c30450
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date:   Fri Aug 19 00:53:00 2022 +0300

    Migrations: add new migations for the media table
39ce21b2 — Jae Lo Presti (DN0) 2 years ago
README: add current status of what's working and TODOs
b7a7e163 — Jae Lo Presti (DN0) 2 years ago
Meta: cleanup (remove prints of sensitive info)
d67cba5f — Jae Lo Presti (DN0) 2 years ago
API: fully functioning login & refresh sequence

Added:
 - Refresh endpoint so launchers can refresh the session (/refresh)

Fixed:
 - Moved the main response generators to their own files (playerutil.py)

Minor:
 - Added a test cape URI in the profile response
6063499a — Jae Lo Presti (DN0) 2 years ago
API: Full functional login sequence

Fixes:
 - Abandon base64 for simplicy's sake

Additions:
 - Profile endpoint that returns skins and capes (/minecraft/profile)

TODO:
 - Correct skin server
8a7ba90b — Jae Lo Presti (DN0) 2 years ago
API: Working login / register

Fixes:
 - Patch bug in the password hash storage that would store the function
   instead of the the actual hash

Additions:
 - Login endpoint (/authenticate)
26ac5531 — Jae Lo Presti (DN0) 2 years ago
API: add working way of registering for an account

New endpoint: /api/v1/register [POST]
d5e2d341 — Jae Lo Presti (DN0) 2 years ago
Migrations: update base schema to include auto increment
68e73c20 — Jae Lo Presti (DN0) 2 years ago
Requirements: add hashing dep (bcrypt)
8d899d66 — Jae Lo Presti (DN0) 2 years ago
DBUtils: cache data to avoid DB load
d40c5fc0 — Jae Lo Presti (DN0) 2 years ago
Utils: add Redis utils (get and store values)
b6a0c9ef — Jae Lo Presti (DN0) 2 years ago
Requirements: add Redis (caching)
4f15caa7 — Jae Lo Presti (DN0) 2 years ago
StatsAPI: add util + fill API on some stats (number of users registered
all/24h)
7f37069a — Jae Lo Presti (DN0) 2 years ago
API: create basic userapi (username -> uuid) and serve it
41c0e2d5 — Jae Lo Presti (DN0) 2 years ago
Gitignore: fix typo in gitignore
b5541a8c — Jae Lo Presti (DN0) 2 years ago
DB: add object get method + basic DB utils (get uuid from username)
9f59745e — Jae Lo Presti (DN0) 2 years ago
Gitignore: ignore init files (mainly for yoyo)
e892e3fe — Jae Lo Presti (DN0) 2 years ago
Migrations: add migration script & migrations folder
779698ea — Jae Lo Presti (DN0) 2 years ago
Gitignore: ignore sqlite databases
Next
Do not follow this link