pye/README.md

27 lines
861 B
Markdown
Raw Normal View History

2024-10-12 16:59:47 +03:00
# Auth microservice
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 22:31:07 +03:00
## Commands
2024-10-12 10:22:05 +03:00
2024-10-13 11:25:00 +03:00
## JWT server
2024-10-12 22:31:07 +03:00
2024-10-13 11:25:00 +03:00
Serve a simple JWT auth system
**Usage**: `pye serve [--config] [--port] [--db]`
2024-10-12 21:45:00 +03:00
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 16:59:47 +03:00
* `GET /pem` - get PEM-encoded public RS256 key
2024-10-12 22:31:07 +03:00
* Data and RS256 key persistently stored in an SQLite database and a PEM file
2024-10-12 21:45:00 +03:00
2024-10-13 11:25:00 +03:00
## JWT verification
2024-10-12 21:45:00 +03:00
2024-10-13 11:25:00 +03:00
Verify a JWT with a public key from a PEM file
**Usage**: `pye verify <jwt> <pem_file>`