π§© π¬ An SSO service that supports a microservice architecture {auth, user-info, premission} - microservices.
π‘οΈ βοΈ Responsible for registering users, storing their data in a secure form in the database, authentication, checking for administrator rights.
π π οΈ The server uses Remote Procedure Call is a technique for building distributed systems.
- jwt tokens-JWT γ €γ €γ €γ €γ €γ €γ €|| crypto - bcrypt
- env\flag parse-cleanenv γ €γ €γ €|| logger - slog
- request generator - gofakeit γ €|| testing - testify
- db migration-Goose γ €γ €γ €γ €γ €|| db - sqlite
- rpc framework gRPCγ €γ €γ €γ €γ €|| client - postman
Auth/Register| Parameter | Type | Description |
|---|---|---|
email |
string |
Required. User email |
password |
string |
Required. User password |
{
"email": "Goblin@sosamuzik.com",
"password": "FreeSosaPlatina67@!"
} Auth/Login| Parameter | Type | Description |
|---|---|---|
email |
string |
Required. User email |
password |
string |
Required. User password |
app_id |
int32 |
User has to choose app |
{
"email": "Goblin@sosamuzik.com",
"password": "FreeSosaPlatina67@!"
"app_id": 1
} Auth/IsAdmin| Parameter | Type | Description |
|---|---|---|
user_id |
int64 |
Required. |
{
"app_id": 8952812
}Clone the project
git clone https://github.com/Sem4kok/SSOGo to the project directory
cd SSOMake DataBase migrations
make migrateStart the auth server
make authIf you want to rewrite protobuf contract then you have to
make protoc