2024-10-11 23:57:57 +03:00
|
|
|
# PYE Auth
|
2024-10-11 11:38:08 +03:00
|
|
|
|
2024-10-11 23:57:57 +03:00
|
|
|
**Mission**: Science compels us to create a microservice!
|
|
|
|
|
|
|
|
This is the repository for my **JWT auth microservice assignment**
|
|
|
|
with(out) blazingly fast cloud-native web3 memory-safe blockchain reactive AI
|
|
|
|
(insert a dozen more buzzwords of your choosing) technologies.
|
|
|
|
|
2024-10-12 09:55:58 +03:00
|
|
|
This should be done by **October 17th 2024**. Or, at the very least,
|
|
|
|
in a state that proves I am competent Go developer.
|
2024-10-11 23:57:57 +03:00
|
|
|
|
2024-10-12 10:44:12 +03:00
|
|
|
Note: **JSON** is used for storage at proof-of-concept stage for ease of use,
|
|
|
|
obviously I'd use **SQL** for production
|
2024-10-12 10:22:05 +03:00
|
|
|
|
|
|
|
## Current functionality
|
|
|
|
|
2024-10-12 10:44:12 +03:00
|
|
|
* Port 7102
|
2024-10-12 10:22:05 +03:00
|
|
|
* `POST /register` - register a user with Basic Auth
|
|
|
|
* `POST /login` - get a JWT token by Basic Auth
|
2024-10-12 10:44:12 +03:00
|
|
|
* `GET /public-key` - get PEM-encoded public HS256 key
|
|
|
|
* Data persistently stored in... `data.json`, for convenience
|
|
|
|
* HS256 key loaded from `key` file or generated on startup if missing
|